Skip to content

Commit 526aa12

Browse files
authored
CSS for 5 examples: Resolve Stylelint no-descending-specificity (pull #1649)
1 parent 2a80944 commit 526aa12

File tree

6 files changed

+145
-147
lines changed

6 files changed

+145
-147
lines changed

.stylelintrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
]
1010
}
1111
],
12-
"no-descending-specificity": null,
1312
"prettier/prettier": [true, {"singleQuote": false}]
1413
}
1514
}

examples/carousel/css/carousel-prev-next.css

Lines changed: 31 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,29 @@ img.reload {
6363
border: 0 solid transparent;
6464
}
6565

66+
.carousel-moreaccessible .carousel-items .carousel-image a {
67+
display: block;
68+
margin: 0;
69+
padding: 5px;
70+
text-decoration: none;
71+
border: none;
72+
}
73+
74+
.carousel-moreaccessible .carousel-item .carousel-caption a {
75+
display: inline-block;
76+
margin: 0;
77+
padding: 6px;
78+
color: black;
79+
background-color: transparent;
80+
border: none;
81+
border-radius: 5px;
82+
}
83+
84+
.carousel-moreaccessible .carousel-item .carousel-caption span.contrast,
85+
.carousel-moreaccessible .carousel-item .carousel-caption span.contrast:hover {
86+
background-color: transparent;
87+
}
88+
6689
.carousel .carousel-item .carousel-caption a:hover,
6790
.carousel .carousel-item .carousel-caption span.contrast:hover {
6891
background-color: rgba(0, 0, 0, 1);
@@ -189,6 +212,14 @@ img.reload {
189212
border-radius: 5px;
190213
}
191214

215+
/* Shared CSS for Pause and Tab Controls */
216+
217+
.carousel-moreaccessible .controls {
218+
position: relative;
219+
top: 0;
220+
left: 0;
221+
padding: 0.25em 0.25em 0;
222+
}
192223
.carousel.carousel-moreaccessible .controls {
193224
position: static;
194225
height: 36px;
@@ -208,14 +239,6 @@ img.reload {
208239
border: none;
209240
}
210241

211-
.carousel-moreaccessible .carousel-items .carousel-image a {
212-
display: block;
213-
margin: 0;
214-
padding: 5px;
215-
text-decoration: none;
216-
border: none;
217-
}
218-
219242
.carousel-moreaccessible .carousel-items.focus .carousel-image a {
220243
padding: 2px;
221244
border: 3px solid #005a9c;
@@ -237,21 +260,6 @@ img.reload {
237260
color: black;
238261
}
239262

240-
.carousel-moreaccessible .carousel-item .carousel-caption a {
241-
display: inline-block;
242-
margin: 0;
243-
padding: 6px;
244-
color: black;
245-
background-color: transparent;
246-
border: none;
247-
border-radius: 5px;
248-
}
249-
250-
.carousel-moreaccessible .carousel-item .carousel-caption span.contrast,
251-
.carousel-moreaccessible .carousel-item .carousel-caption span.contrast:hover {
252-
background-color: transparent;
253-
}
254-
255263
.carousel-moreaccessible .carousel-item .carousel-caption p {
256264
padding: 0;
257265
margin: 0;
@@ -274,12 +282,3 @@ img.reload {
274282
color: black;
275283
outline: none;
276284
}
277-
278-
/* Shared CSS for Pause and Tab Controls */
279-
280-
.carousel-moreaccessible .controls {
281-
position: relative;
282-
top: 0;
283-
left: 0;
284-
padding: 0.25em 0.25em 0;
285-
}

examples/carousel/css/carousel-tablist.css

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,32 @@ img.reload {
6363
border: 0 solid transparent;
6464
}
6565

66+
.carousel-tablist-moreaccessible .carousel-items .carousel-image a {
67+
display: block;
68+
margin: 0;
69+
padding: 5px;
70+
text-decoration: none;
71+
border: none;
72+
}
73+
74+
.carousel-tablist-moreaccessible .carousel-item .carousel-caption a {
75+
display: inline-block;
76+
margin: 0;
77+
padding: 6px;
78+
color: black;
79+
background-color: transparent;
80+
border: none;
81+
border-radius: 5px;
82+
}
83+
84+
.carousel-tablist-moreaccessible .carousel-item .carousel-caption span.contrast,
85+
.carousel-tablist-moreaccessible
86+
.carousel-item
87+
.carousel-caption
88+
span.contrast:hover {
89+
background-color: transparent;
90+
}
91+
6692
.carousel-tablist .carousel-item .carousel-caption a:hover,
6793
.carousel-tablist .carousel-item .carousel-caption span.contrast:hover {
6894
background-color: rgba(0, 0, 0, 1);
@@ -221,10 +247,22 @@ img.reload {
221247
stroke-width: 2px;
222248
}
223249

250+
.carousel-tablist-moreaccessible [role="tab"] circle.tab-background {
251+
z-index: 16;
252+
}
253+
254+
.carousel-tablist-moreaccessible [role="tab"] circle.tab {
255+
z-index: 18;
256+
}
257+
224258
.carousel-tablist [role="tab"][aria-selected="true"] circle.tab {
225259
fill: white;
226260
}
227261

262+
.carousel-tablist-moreaccessible [role="tab"] circle.border {
263+
z-index: 14;
264+
}
265+
228266
.carousel-tablist [role="tab"]:focus circle.border {
229267
display: block;
230268
fill: #005a9c;
@@ -269,14 +307,6 @@ img.reload {
269307
border: none;
270308
}
271309

272-
.carousel-tablist-moreaccessible .carousel-items .carousel-image a {
273-
display: block;
274-
margin: 0;
275-
padding: 5px;
276-
text-decoration: none;
277-
border: none;
278-
}
279-
280310
.carousel-tablist-moreaccessible .carousel-items.focus .carousel-image a {
281311
padding: 2px;
282312
border: 3px solid #005a9c;
@@ -298,24 +328,6 @@ img.reload {
298328
color: black;
299329
}
300330

301-
.carousel-tablist-moreaccessible .carousel-item .carousel-caption a {
302-
display: inline-block;
303-
margin: 0;
304-
padding: 6px;
305-
color: black;
306-
background-color: transparent;
307-
border: none;
308-
border-radius: 5px;
309-
}
310-
311-
.carousel-tablist-moreaccessible .carousel-item .carousel-caption span.contrast,
312-
.carousel-tablist-moreaccessible
313-
.carousel-item
314-
.carousel-caption
315-
span.contrast:hover {
316-
background-color: transparent;
317-
}
318-
319331
.carousel-tablist-moreaccessible .carousel-item .carousel-caption p {
320332
padding: 0;
321333
margin: 0;
@@ -353,15 +365,3 @@ img.reload {
353365
.carousel-tablist-moreaccessible [role="tab"] {
354366
z-index: 20;
355367
}
356-
357-
.carousel-tablist-moreaccessible [role="tab"] circle.border {
358-
z-index: 14;
359-
}
360-
361-
.carousel-tablist-moreaccessible [role="tab"] circle.tab {
362-
z-index: 18;
363-
}
364-
365-
.carousel-tablist-moreaccessible [role="tab"] circle.tab-background {
366-
z-index: 16;
367-
}

examples/combobox/css/combobox-datepicker.css

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,26 @@
5757
outline-offset: 2px;
5858
}
5959

60+
.combobox-datepicker .dialog button {
61+
border-style: none;
62+
background: transparent;
63+
}
64+
65+
.combobox-datepicker .dialog-ok-cancel-group button {
66+
padding: 6px;
67+
margin-left: 1em;
68+
width: 5em;
69+
background-color: hsl(216, 80%, 92%);
70+
font-size: 0.85em;
71+
color: black;
72+
outline: none;
73+
border-radius: 5px;
74+
}
75+
76+
.combobox-datepicker .dialog button::-moz-focus-inner {
77+
border: 0;
78+
}
79+
6080
.combobox-datepicker .group.focus input,
6181
.combobox-datepicker .group.focus button {
6282
background-color: #def;
@@ -67,8 +87,8 @@
6787
stroke: transparent;
6888
}
6989

70-
.combobox-datepicker .group button[aria-expanded="true"] polygon,
71-
.combobox-datepicker .group.focus polygon {
90+
.combobox-datepicker .group.focus polygon,
91+
.combobox-datepicker .group button[aria-expanded="true"] polygon {
7292
fill: black;
7393
stroke: white;
7494
}
@@ -109,15 +129,6 @@
109129
font-weight: bold;
110130
}
111131

112-
.combobox-datepicker .dialog button {
113-
border-style: none;
114-
background: transparent;
115-
}
116-
117-
.combobox-datepicker .dialog button::-moz-focus-inner {
118-
border: 0;
119-
}
120-
121132
.combobox-datepicker .dates {
122133
width: 320px;
123134
padding-left: 1em;
@@ -162,17 +173,6 @@
162173
margin-right: 1em;
163174
}
164175

165-
.combobox-datepicker .dialog-ok-cancel-group button {
166-
padding: 6px;
167-
margin-left: 1em;
168-
width: 5em;
169-
background-color: hsl(216, 80%, 92%);
170-
font-size: 0.85em;
171-
color: black;
172-
outline: none;
173-
border-radius: 5px;
174-
}
175-
176176
.combobox-datepicker .dialog-button:focus {
177177
padding: 4px;
178178
border: 2px solid black;
@@ -229,17 +229,17 @@
229229
background-color: hsl(216, 80%, 92%);
230230
}
231231

232-
.combobox-datepicker .dates td:not(.disabled):hover {
233-
padding: 2px;
234-
border: 1px solid rgb(100, 100, 100);
235-
}
236-
237232
.combobox-datepicker .dates td:focus {
238233
padding: 1px;
239234
border: 2px solid rgb(100, 100, 100);
240235
outline: 0;
241236
}
242237

238+
.combobox-datepicker .dates td:not(.disabled):hover {
239+
padding: 2px;
240+
border: 1px solid rgb(100, 100, 100);
241+
}
242+
243243
.combobox-datepicker .dialog-message {
244244
padding-top: 0.25em;
245245
padding-left: 1em;

examples/menubar/css/menubar-editor.css

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,13 @@
7878
text-decoration: line-through;
7979
}
8080

81+
.menubar-editor [role="menubar"] [role="separator"] {
82+
padding-top: 3px;
83+
background-image: url("../images/separator.svg");
84+
background-position: center;
85+
background-repeat: repeat-x;
86+
}
87+
8188
.menubar-editor [role="menubar"] [role="menuitem"],
8289
.menubar-editor [role="menubar"] [role="menuitemcheckbox"],
8390
.menubar-editor [role="menubar"] [role="menuitemradio"],
@@ -104,13 +111,6 @@
104111
width: 8em;
105112
}
106113

107-
.menubar-editor [role="menubar"] [role="separator"] {
108-
padding-top: 3px;
109-
background-image: url("../images/separator.svg");
110-
background-position: center;
111-
background-repeat: repeat-x;
112-
}
113-
114114
.menubar-editor [role="menubar"] [role="menu"] [aria-checked="true"] {
115115
padding: 6px;
116116
padding-left: 8px;

0 commit comments

Comments
 (0)