Skip to content

Commit

Permalink
Infrastructure: Update Stylelint (#2077)
Browse files Browse the repository at this point in the history
Autofix and address most new rules.
Ignore the kebab case rules
  • Loading branch information
nschonni authored Nov 10, 2021
1 parent fcaaba2 commit edddf9f
Show file tree
Hide file tree
Showing 34 changed files with 412 additions and 854 deletions.
2 changes: 2 additions & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
]
},
],
"selector-class-pattern": null,
"selector-id-pattern": null,
"prettier/prettier": [true, {"singleQuote": false}]
}
}
18 changes: 9 additions & 9 deletions examples/accordion/css/accordion.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.accordion {
margin: 0;
padding: 0;
border: 2px solid hsl(0, 0%, 52%);
border: 2px solid hsl(0deg 0% 52%);
border-radius: 7px;
width: 20em;
}
Expand All @@ -12,20 +12,20 @@
}

.accordion:focus-within {
border-color: hsl(216, 94%, 43%);
border-color: hsl(216deg 94% 43%);
}

.accordion:focus-within h3 {
background-color: hsl(0, 0%, 97%);
background-color: hsl(0deg 0% 97%);
}

.accordion > * + * {
border-top: 1px solid hsl(0, 0%, 52%);
border-top: 1px solid hsl(0deg 0% 52%);
}

.accordion-trigger {
background: none;
color: hsl(0, 0%, 13%);
color: hsl(0deg 0% 13%);
display: block;
font-size: 1rem;
font-weight: normal;
Expand All @@ -39,7 +39,7 @@

.accordion-trigger:focus,
.accordion-trigger:hover {
background: hsl(216, 94%, 94%);
background: hsl(216deg 94% 94%);
}

.accordion-trigger:focus {
Expand Down Expand Up @@ -74,7 +74,7 @@ button {
}

.accordion-trigger:focus .accordion-title {
border-color: hsl(216, 94%, 43%);
border-color: hsl(216deg 94% 43%);
}

.accordion-icon {
Expand All @@ -91,7 +91,7 @@ button {

.accordion-trigger:focus .accordion-icon,
.accordion-trigger:hover .accordion-icon {
border-color: hsl(216, 94%, 43%);
border-color: hsl(216deg 94% 43%);
}

.accordion-trigger[aria-expanded="true"] .accordion-icon {
Expand All @@ -115,7 +115,7 @@ fieldset {
}

input {
border: 1px solid hsl(0, 0%, 42%);
border: 1px solid hsl(0deg 0% 42%);
border-radius: 0.3em;
display: block;
font-size: inherit;
Expand Down
4 changes: 2 additions & 2 deletions examples/alert/css/alert.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[role="alert"] {
padding: 10px;
border: 2px solid hsl(206, 74%, 54%);
border: 2px solid hsl(206deg 74% 54%);
border-radius: 4px;
background: hsl(206, 74%, 90%);
background: hsl(206deg 74% 90%);
}

[role="alert"]:empty {
Expand Down
4 changes: 2 additions & 2 deletions examples/breadcrumb/css/breadcrumb.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
nav.breadcrumb {
padding: 0.8em 1em;
border: 1px solid hsl(0, 0%, 90%);
border: 1px solid hsl(0deg 0% 90%);
border-radius: 4px;
background: hsl(300, 14%, 97%);
background: hsl(300deg 14% 97%);
}

nav.breadcrumb ol {
Expand Down
74 changes: 37 additions & 37 deletions examples/button/css/button.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@
display: inline-block;
position: relative;
padding: 0.4em 0.7em;
border: 1px solid hsl(213, 71%, 49%);
border: 1px solid hsl(213deg 71% 49%);
border-radius: 5px;
box-shadow: 0 1px 2px hsl(216, 27%, 55%);
box-shadow: 0 1px 2px hsl(216deg 27% 55%);
color: #fff;
text-shadow: 0 -1px 1px hsl(216, 27%, 25%);
background-color: hsl(216, 82%, 51%);
text-shadow: 0 -1px 1px hsl(216deg 27% 25%);
background-color: hsl(216deg 82% 51%);
background-image: linear-gradient(
to bottom,
hsl(216, 82%, 53%),
hsl(216, 82%, 47%)
hsl(216deg 82% 53%),
hsl(216deg 82% 47%)
);
}

[role="button"]:hover {
border-color: hsl(213, 71%, 29%);
background-color: hsl(216, 82%, 31%);
border-color: hsl(213deg 71% 29%);
background-color: hsl(216deg 82% 31%);
background-image: linear-gradient(
to bottom,
hsl(216, 82%, 33%),
hsl(216, 82%, 27%)
hsl(216deg 82% 33%),
hsl(216deg 82% 27%)
);
cursor: default;
}
Expand All @@ -39,72 +39,72 @@
right: calc(-1px - 3px - 3px);
bottom: calc(-1px - 3px - 3px);
left: calc(-1px - 3px - 3px);
border: 3px solid hsl(213, 71%, 49%);
border: 3px solid hsl(213deg 71% 49%);

/* button border radius + outline width + offset */
border-radius: calc(5px + 3px + 3px);
content: "";
}

[role="button"]:active {
border-color: hsl(213, 71%, 49%);
background-color: hsl(216, 82%, 31%);
border-color: hsl(213deg 71% 49%);
background-color: hsl(216deg 82% 31%);
background-image: linear-gradient(
to bottom,
hsl(216, 82%, 53%),
hsl(216, 82%, 47%)
hsl(216deg 82% 53%),
hsl(216deg 82% 47%)
);
box-shadow: inset 0 3px 5px 1px hsl(216, 82%, 30%);
box-shadow: inset 0 3px 5px 1px hsl(216deg 82% 30%);
}

[role="button"][aria-pressed] {
border-color: hsl(261, 71%, 49%);
box-shadow: 0 1px 2px hsl(261, 27%, 55%);
text-shadow: 0 -1px 1px hsl(261, 27%, 25%);
background-color: hsl(261, 82%, 51%);
border-color: hsl(261deg 71% 49%);
box-shadow: 0 1px 2px hsl(261deg 27% 55%);
text-shadow: 0 -1px 1px hsl(261deg 27% 25%);
background-color: hsl(261deg 82% 51%);
background-image: linear-gradient(
to bottom,
hsl(261, 82%, 53%),
hsl(261, 82%, 47%)
hsl(261deg 82% 53%),
hsl(261deg 82% 47%)
);
}

[role="button"][aria-pressed]:hover {
border-color: hsl(261, 71%, 29%);
background-color: hsl(261, 82%, 31%);
border-color: hsl(261deg 71% 29%);
background-color: hsl(261deg 82% 31%);
background-image: linear-gradient(
to bottom,
hsl(261, 82%, 33%),
hsl(261, 82%, 27%)
hsl(261deg 82% 33%),
hsl(261deg 82% 27%)
);
}

[role="button"][aria-pressed="true"] {
padding-top: 0.5em;
padding-bottom: 0.3em;
border-color: hsl(261, 71%, 49%);
background-color: hsl(261, 82%, 31%);
border-color: hsl(261deg 71% 49%);
background-color: hsl(261deg 82% 31%);
background-image: linear-gradient(
to bottom,
hsl(261, 82%, 63%),
hsl(261, 82%, 57%)
hsl(261deg 82% 63%),
hsl(261deg 82% 57%)
);
box-shadow: inset 0 3px 5px 1px hsl(261, 82%, 30%);
box-shadow: inset 0 3px 5px 1px hsl(261deg 82% 30%);
}

[role="button"][aria-pressed="true"]:hover {
border-color: hsl(261, 71%, 49%);
background-color: hsl(261, 82%, 31%);
border-color: hsl(261deg 71% 49%);
background-color: hsl(261deg 82% 31%);
background-image: linear-gradient(
to bottom,
hsl(261, 82%, 43%),
hsl(261, 82%, 37%)
hsl(261deg 82% 43%),
hsl(261deg 82% 37%)
);
box-shadow: inset 0 3px 5px 1px hsl(261, 82%, 20%);
box-shadow: inset 0 3px 5px 1px hsl(261deg 82% 20%);
}

[role="button"][aria-pressed]:focus::before {
border-color: hsl(261, 71%, 49%);
border-color: hsl(261deg 71% 49%);
}

[role="button"] svg {
Expand Down
13 changes: 7 additions & 6 deletions examples/carousel/css/carousel-prev-next.css
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ img.reload {
display: inline-block;
margin: 0;
padding: 6px;
background-color: rgba(0, 0, 0, 0.65);
background-color: rgb(0 0 0 / 65%);
border-radius: 5px;
border: 0 solid transparent;
}
Expand Down Expand Up @@ -88,13 +88,13 @@ img.reload {

.carousel .carousel-item .carousel-caption a:hover,
.carousel .carousel-item .carousel-caption span.contrast:hover {
background-color: rgba(0, 0, 0, 1);
background-color: rgb(0 0 0 / 100%);
}

.carousel .carousel-item .carousel-caption a:focus {
padding: 4px;
border: 2px solid #fff;
background-color: rgba(0, 0, 0, 1);
background-color: rgb(0 0 0 / 100%);
outline: none;
border-width: 2px solid #fff;
color: #fff;
Expand Down Expand Up @@ -154,7 +154,7 @@ img.reload {
stroke: black;
fill: black;
stroke-width: 1px;
opacity: 0.6;
opacity: 60%;
}

.carousel .controls svg .border {
Expand Down Expand Up @@ -195,7 +195,7 @@ img.reload {
.carousel .controls button:hover svg .border {
fill: #005a9c;
stroke: #005a9c;
opacity: 1;
opacity: 100%;
}

.carousel .controls button:focus svg .border {
Expand All @@ -220,6 +220,7 @@ img.reload {
left: 0;
padding: 0.25em 0.25em 0;
}

.carousel.carousel-moreaccessible .controls {
position: static;
height: 36px;
Expand Down Expand Up @@ -272,7 +273,7 @@ img.reload {
}

.carousel-moreaccessible .carousel-item .carousel-caption a:hover {
background-color: rgba(0, 0, 0, 0.2);
background-color: rgb(0 0 0 / 20%);
}

.carousel-moreaccessible .carousel-item .carousel-caption a:focus {
Expand Down
20 changes: 10 additions & 10 deletions examples/carousel/css/carousel-tablist.css
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ img.reload {
margin: 0;
padding: 6px;
display: inline-block;
background-color: rgba(0, 0, 0, 0.65);
background-color: rgb(0 0 0 / 65%);
border-radius: 5px;
border: 0 solid transparent;
}
Expand Down Expand Up @@ -91,13 +91,13 @@ img.reload {

.carousel-tablist .carousel-item .carousel-caption a:hover,
.carousel-tablist .carousel-item .carousel-caption span.contrast:hover {
background-color: rgba(0, 0, 0, 1);
background-color: rgb(0 0 0 / 100%);
}

.carousel-tablist .carousel-item .carousel-caption a:focus {
padding: 4px;
border: 2px solid #eee;
background-color: rgba(0, 0, 0, 1);
background-color: rgb(0 0 0 / 100%);
outline: none;
border-width: 2px solid #fff;
color: #fff;
Expand Down Expand Up @@ -154,7 +154,7 @@ img.reload {
stroke: black;
fill: black;
stroke-width: 1px;
opacity: 0.6;
opacity: 60%;
}

.carousel-tablist .svg-play .border {
Expand Down Expand Up @@ -186,7 +186,7 @@ img.reload {
.carousel-tablist .rotation:hover .svg-play .border {
fill: #005a9c;
stroke: #005a9c;
opacity: 1;
opacity: 100%;
}

.carousel-tablist .rotation:focus .svg-play .border {
Expand All @@ -202,7 +202,7 @@ img.reload {
display: inline-block;
padding-top: 2px;
height: 30px;
background-color: rgba(0, 0, 0, 0.65);
background-color: rgb(0 0 0 / 65%);
}

.carousel-tablist [role="tablist"].focus {
Expand Down Expand Up @@ -236,7 +236,7 @@ img.reload {
stroke: black;
fill: black;
stroke-width: 2px;
opacity: 0.6;
opacity: 60%;
z-index: 14;
}

Expand Down Expand Up @@ -277,14 +277,14 @@ img.reload {
.carousel-tablist [role="tab"]:hover circle.tab-background {
fill: white;
stroke: white;
opacity: 1;
opacity: 100%;
}

.carousel-tablist [role="tab"]:hover circle.border,
.carousel-tablist [role="tab"]:hover circle.tab {
fill: #005a9c;
stroke: #005a9c;
opacity: 1;
opacity: 100%;
}

.carousel-tablist [role="tab"][aria-selected="true"]:hover circle.tab {
Expand Down Expand Up @@ -340,7 +340,7 @@ img.reload {
}

.carousel-tablist-moreaccessible .carousel-item .carousel-caption a:hover {
background-color: rgba(0, 0, 0, 0.2);
background-color: rgb(0 0 0 / 20%);
}

.carousel-tablist-moreaccessible .carousel-item .carousel-caption a:focus {
Expand Down
2 changes: 1 addition & 1 deletion examples/combobox/css/combobox-autocomplete.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
width: 19px;
border-left: none;
outline: none;
color: rgb(0, 90, 156);
color: rgb(0 90 156);
}

.combobox button[aria-expanded="true"] svg {
Expand Down
Loading

0 comments on commit edddf9f

Please sign in to comment.