Skip to content

Commit 29f3782

Browse files
authored
Merge branch 'main' into audio
2 parents 86c8c47 + 952c342 commit 29f3782

8 files changed

Lines changed: 187 additions & 61 deletions

File tree

.stylelintrc.css.json

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
{
2+
"extends": "stylelint-config-standard",
3+
"ignoreFiles": [
4+
"src/content.css"
5+
],
6+
"rules": {
7+
"at-rule-name-case": "lower",
8+
"at-rule-name-space-after": "always",
9+
"at-rule-no-unknown": true,
10+
"block-opening-brace-newline-after": "always",
11+
"block-closing-brace-newline-before": [ "always", {
12+
"severity": "warning"
13+
} ],
14+
"block-closing-brace-newline-after": "always",
15+
"block-no-empty": [ true, {
16+
"severity": "error"
17+
} ],
18+
"color-no-invalid-hex": true,
19+
"comment-no-empty": true,
20+
"declaration-block-no-duplicate-properties": [ true, {
21+
"severity": "warning"
22+
} ],
23+
"declaration-block-no-shorthand-property-overrides": true,
24+
"declaration-colon-space-before": "never",
25+
"declaration-colon-space-after": "always-single-line",
26+
"declaration-block-no-redundant-longhand-properties": true,
27+
"declaration-block-semicolon-newline-after": [ "always", {
28+
"severity": "warning"
29+
} ],
30+
"declaration-block-trailing-semicolon": "always",
31+
"declaration-no-important": [ true, {
32+
"severity": "warning"
33+
} ],
34+
"font-family-no-duplicate-names": true,
35+
"font-family-no-missing-generic-family-keyword": true,
36+
"function-comma-space-after": [ "always", {
37+
"severity": "warning"
38+
} ],
39+
"function-max-empty-lines": 0,
40+
"function-url-quotes": "always",
41+
"indentation": 2,
42+
"max-empty-lines": 1,
43+
"media-feature-colon-space-before": "never",
44+
"media-feature-colon-space-after": "always",
45+
"media-feature-name-case": "lower",
46+
"media-feature-name-no-vendor-prefix": true,
47+
"media-feature-name-no-unknown": true,
48+
"media-feature-range-operator-space-after": "always",
49+
"media-feature-range-operator-space-before": "always",
50+
"no-duplicate-at-import-rules": true,
51+
"no-duplicate-selectors": true,
52+
"no-eol-whitespace": true,
53+
"no-extra-semicolons": true,
54+
"no-missing-end-of-source-newline": true,
55+
"number-no-trailing-zeros": true,
56+
"property-case": "lower",
57+
"property-no-unknown": true,
58+
"selector-attribute-quotes": "always",
59+
"selector-class-pattern": [ "^[a-z0-9]+(?:-[a-z0-9]+)*(?:-(?:-[a-z0-9]+)*)?$", {
60+
"severity": "warning"
61+
} ],
62+
"selector-combinator-space-before": "always",
63+
"selector-combinator-space-after": "always",
64+
"selector-descendant-combinator-no-non-space": true,
65+
"selector-list-comma-space-before": "never",
66+
"selector-max-empty-lines": 0,
67+
"selector-pseudo-class-case": "lower",
68+
"selector-pseudo-element-case": "lower",
69+
"selector-pseudo-class-no-unknown": true,
70+
"selector-pseudo-element-no-unknown": true,
71+
"selector-type-no-unknown": [ true, {
72+
"severity": "warning"
73+
} ],
74+
"string-quotes": [ "double", {
75+
"severity": "warning"
76+
} ],
77+
"unit-no-unknown": true,
78+
"unit-case": "lower",
79+
"value-keyword-case": ["lower", {"ignoreKeywords": ["dummyValue"]}],
80+
"value-list-max-empty-lines": 0,
81+
"value-no-vendor-prefix": [ true, {
82+
"severity": "warning"
83+
} ]
84+
}
85+
}

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@
5454
"lint": "npm run-script lint:bash && npm run-script lint:css && npm run-script lint:typescript",
5555
"lint:typescript": "eslint src && tsc",
5656
"lint:exports": "ts-unused-exports ./tsconfig.json",
57-
"lint:css": "stylelint 'src/**/*.tsx'",
57+
"lint:css": "npm run-script lint:css:tsx && npm run-script lint:css:plain",
58+
"lint:css:tsx": "stylelint 'src/**/*.tsx'",
59+
"lint:css:plain": "stylelint --config .stylelintrc.css.json 'src/**/*.css'",
5860
"lint:bash": "shellcheck $(find . -type f \\( -iname '*\\.sh' -or -iname '*\\.bash' \\) | grep -v -e .venv -e node_modules)",
5961
"prestart": "npm run-script build:css",
6062
"start": "./script/start.bash",

src/app/components/Button.css

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
.button-transparent {
7777
border: none;
7878
background-color: transparent;
79-
color: var(--button-transparent-color, #027EB5);
79+
color: var(--button-transparent-color, #027eb5);
8080
font-weight: normal;
8181
box-shadow: none;
8282
}
@@ -130,13 +130,13 @@
130130
.button-link {
131131
outline: none;
132132
font-size: 1.6rem;
133-
color: var(--link-color, #027EB5);
133+
color: var(--link-color, #027eb5);
134134
cursor: pointer;
135135
text-decoration: underline;
136136
}
137137

138138
.button-link:hover {
139-
color: var(--link-hover, #0064A0);
139+
color: var(--link-hover, #0064a0);
140140
}
141141

142142
.button-link-decorated {
@@ -145,13 +145,13 @@
145145
}
146146

147147
.button-link-decorated::after {
148-
content: '';
148+
content: "";
149149
position: absolute;
150150
bottom: 0;
151151
left: 0;
152152
width: 0;
153153
height: 0.1rem;
154-
background-color: var(--link-color, #027EB5);
154+
background-color: var(--link-color, #027eb5);
155155
}
156156

157157
.button-link-decorated:hover::after,
@@ -161,28 +161,28 @@
161161
}
162162

163163
.button-link-decorated:hover {
164-
color: var(--link-hover, #0064A0);
164+
color: var(--link-hover, #0064a0);
165165
text-decoration: none;
166166
}
167167

168168
.button-link-decorated:focus {
169-
color: var(--link-hover, #0064A0);
169+
color: var(--link-hover, #0064a0);
170170
text-decoration: none;
171171
}
172172

173173
/* ButtonLink disabled state */
174174
.button-link[disabled],
175-
.button-link[aria-disabled='true'],
175+
.button-link[aria-disabled="true"],
176176
.button-link-decorated[disabled],
177-
.button-link-decorated[aria-disabled='true'] {
177+
.button-link-decorated[aria-disabled="true"] {
178178
cursor: not-allowed;
179179
opacity: 0.6;
180180
pointer-events: none;
181181
text-decoration: none;
182182
}
183183

184184
.button-link-decorated[disabled]::after,
185-
.button-link-decorated[aria-disabled='true']::after {
185+
.button-link-decorated[aria-disabled="true"]::after {
186186
width: 0;
187187
background-color: transparent;
188188
}

src/app/components/Checkbox.css

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,16 @@
5353
.checkbox-label:focus-within {
5454
border-radius: 0.4rem;
5555
background-color: var(--checkbox-focus-bg, #f1f1f1); /* theme.color.neutral.pageBackground */
56+
5657
/* Browser default focus outline */
5758
outline: 0.2rem auto Highlight;
58-
outline: 0.2rem auto -webkit-focus-ring-color;
59+
/* stylelint-disable-next-line declaration-block-no-duplicate-properties */
60+
outline: 0.2rem auto -webkit-focus-ring-color; /* Fallback for webkit browsers */
5961
}
6062

63+
/* stylelint-disable no-descending-specificity */
64+
65+
/* Focus-within must come after input state selectors to properly override border styling */
6166
.checkbox-label:focus-within .checkbox-custom {
6267
border: 1px solid var(--checkbox-checked-bg, #b03808); /* theme.color.primary.orange.darkest */
6368
}
@@ -68,6 +73,8 @@
6873
background-color: var(--checkbox-focus-bg, #f1f1f1); /* theme.color.neutral.pageBackground */
6974
}
7075

76+
/* Focus fallback must also come after input state selectors */
7177
.checkbox-label.focus-within .checkbox-custom {
7278
border: 1px solid var(--checkbox-checked-bg, #b03808); /* theme.color.primary.orange.darkest */
7379
}
80+
/* stylelint-enable no-descending-specificity */

src/app/components/Details.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
.details-expand-icon,
99
.details-collapse-icon {
1010
display: inline-block;
11-
vertical-align: -.125em;
11+
vertical-align: -0.125em;
1212
overflow: hidden;
1313
height: 1.7rem;
1414
width: 1.7rem;

src/app/components/ScrollLock.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ body.body.scroll-lock {
1616
@media print {
1717
body.body.scroll-lock,
1818
body.body.scroll-lock-medium-screens-only {
19-
overflow: visible !important;
19+
/* stylelint-disable-next-line declaration-no-important */
20+
overflow: visible !important; /* Must override scroll lock for printing */
2021
}
2122
}
2223

@@ -28,6 +29,7 @@ body.body.scroll-lock {
2829
}
2930

3031
/* Hide root in print when scroll lock is active on medium screens only */
32+
3133
/* Only applies when scroll-lock-medium-screens-only is actually locking (mobile viewport) */
3234
@media print and (max-width: 75em) {
3335
body.body.scroll-lock-medium-screens-only #root {

src/app/content/components/ContentPane.css

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,14 @@
6161
/* Sidebar closed states */
6262
@media screen and (max-width: 75em) {
6363
.content-pane-wrapper--sidebar-closed-mobile {
64-
padding-left: 0 !important;
64+
/* stylelint-disable-next-line declaration-no-important */
65+
padding-left: 0 !important; /* Must override responsive padding when sidebar is closed */
6566
}
6667
}
6768

6869
@media screen {
6970
.content-pane-wrapper--sidebar-closed-desktop {
70-
padding-left: 0 !important;
71+
/* stylelint-disable-next-line declaration-no-important */
72+
padding-left: 0 !important; /* Must override responsive padding when sidebar is closed */
7173
}
7274
}

0 commit comments

Comments
 (0)