Skip to content

Commit 0424c40

Browse files
author
arnau march
committed
Updated latest shared/style folders from gaia
1 parent 25f6e56 commit 0424c40

File tree

2 files changed

+19
-17
lines changed

2 files changed

+19
-17
lines changed

style/switches.css

+16-14
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ label.pack-switch input {
2323
left: 0;
2424
}
2525

26-
label.pack-checkbox input + span,
27-
label.pack-radio input + span {
26+
label.pack-checkbox input ~ span:after,
27+
label.pack-radio input ~ span:after {
28+
content: '';
2829
position: absolute;
2930
left: 50%;
3031
top: 50%;
@@ -34,27 +35,27 @@ label.pack-radio input + span {
3435
pointer-events: none;
3536
}
3637

37-
label.pack-checkbox input + span {
38+
label.pack-checkbox input ~ span:after {
3839
background: url(switches/images/check/default.png) no-repeat center top / 2.2rem auto;
3940
}
4041

41-
label.pack-radio input + span {
42+
label.pack-radio input ~ span:after {
4243
background: url(switches/images/radio/default.png) no-repeat center top / 2.2rem auto;
4344
}
4445

45-
label.pack-checkbox input:checked + span,
46-
label.pack-radio input:checked + span,
47-
label.pack-switch input:checked + span {
46+
label.pack-checkbox input:checked ~ span:after,
47+
label.pack-radio input:checked ~ span:after,
48+
label.pack-switch input:checked ~ span:after {
4849
background-position: center bottom;
4950
}
5051

5152
/* 'Dangerous' switches */
5253

53-
label.pack-checkbox.danger input + span {
54+
label.pack-checkbox.danger input ~ span:after {
5455
background-image: url(switches/images/check/danger.png);
5556
}
5657

57-
label.pack-radio.danger input + span {
58+
label.pack-radio.danger input ~ span:after {
5859
background-image: url(switches/images/radio/danger.png);
5960
}
6061

@@ -63,9 +64,10 @@ label.pack-radio.danger input + span {
6364
* ON/OFF SWITCHES
6465
* ---------------------------------- */
6566

66-
label.pack-switch input + span {
67+
label.pack-switch input ~ span:after {
68+
content: '';
6769
position: absolute;
68-
left: 50%;
70+
right: 0;
6971
top: 50%;
7072
margin: -1.1rem 0 0 -2.7rem;
7173
width: 5.1rem;
@@ -79,16 +81,16 @@ label.pack-switch input + span {
7981
}
8082

8183
/* switch: 'ON' state */
82-
label.pack-switch input:checked + span {
84+
label.pack-switch input:checked ~ span:after {
8385
background: #e6e6e6 url(switches/images/switch/background.png) no-repeat 0 0 / 8.3rem 2.1rem;
8486
border-color: #00abcd;
8587
}
8688

8789
/* switch: disabled state */
88-
label.pack-switch input:disabled + span {
90+
label.pack-switch input:disabled ~ span:after {
8991
opacity: 0.4;
9092
}
9193

92-
label.pack-switch input.uninit + span {
94+
label.pack-switch input.uninit ~ span:after {
9395
transition: none;
9496
}

style_unstable/lists.css

+3-3
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,9 @@
175175
border-top: solid 0.1rem #e7e7e7;
176176
}
177177

178-
[data-type="list"] li > .pack-checkbox input + span,
179-
[data-type="list"] li > .pack-radio input + span,
180-
[data-type="list"] li > .pack-switch input + span {
178+
[data-type="list"] li > .pack-checkbox input ~ span:after,
179+
[data-type="list"] li > .pack-radio input ~ span:after,
180+
[data-type="list"] li > .pack-switch input ~ span:after {
181181
left: 0;
182182
margin-left: 0;
183183
}

0 commit comments

Comments
 (0)