refactor(css): track use of undeclared CSS variables

This commit is contained in:
Edouard Vanbelle
2026-04-14 12:30:05 +02:00
parent 5677089f43
commit 08884f3b6d
2 changed files with 21 additions and 4 deletions
+9 -1
View File
@@ -59,8 +59,16 @@ jobs:
with:
node-version: 25
# because we are not using package.json
- name: Install Stylelint and plugins
run: |
npm install --global \
stylelint@17 \
postcss@8 \
stylelint-value-no-unknown-custom-properties@6
- name: Run Stylelint
run: npx stylelint "**/*.{css,scss}"
run: npx stylelint "static/css/**/*.{css,scss}"
rust-fmt:
name: Rustfmt
+12 -3
View File
@@ -1,13 +1,22 @@
{
"files": ["statc/css/**/*.css"],
"plugins": [
"stylelint-value-no-unknown-custom-properties"
],
"rules": {
"color-no-hex": true,
"color-named": "never",
"function-disallowed-list": ["rgb", "rgba", "hsl", "hsla", "hwb", "oklch", "oklab"],
"selector-disallowed-list": ["/\\[data-theme/"]
"selector-disallowed-list": ["/\\[data-theme/"],
"csstools/value-no-unknown-custom-properties": [true, {
"importFrom": [
"static/css/base/variables.css"
]
}]
},
"overrides": [
{
"files": ["**/variables.css"],
"files": ["static/css/base/variables.css"],
"rules": {
"color-no-hex": null,
"color-named": null,
@@ -15,7 +24,7 @@
}
},
{
"files": ["**/themes/dark.css"],
"files": ["static/css/themes/*"],
"rules": {
"color-no-hex": null,
"color-named": null,