refactor(web): move the stylesheet into Tailwind utilities (#281)
ci / web (push) Successful in 33s
e2e / e2e (push) Successful in 1m36s
ci / rust (push) Successful in 1m49s
ci / image (push) Successful in 2m36s

This commit was merged in pull request #281.
This commit is contained in:
2026-11-11 21:14:23 +00:00
parent 5528ac8aa8
commit 5a18facc4f
19 changed files with 1607 additions and 2925 deletions
+4 -2
View File
@@ -40,7 +40,8 @@ function walk(dir, out = []) {
}
const COLOR_LITERAL = /#[0-9a-fA-F]{3,8}\b|\b(?:oklch|oklab|lab|lch|rgba?|hsla?|hwb|color)\(/;
const RELATIVE_FROM_TOKEN = /\b(?:oklch|oklab|lab|lch|rgb|hsl|hwb|color)\(\s*from\s+var\(--/g;
// `_` is a space inside a Tailwind arbitrary value
const RELATIVE_FROM_TOKEN = /\b(?:oklch|oklab|lab|lch|rgb|hsl|hwb|color)\([\s_]*from[\s_]+var\(--/g;
const SPACING_PROP = /^(?:margin|padding|gap|row-gap|column-gap|inset)(?:-[a-z-]+)?$/;
const SPACING_VALUE = /^(?:var\(--[\w-]+\)|0|auto|-?[\d.]+%)$/;
const FONT_SIZE_VALUE = /^var\(--text-[\w-]+\)$/;
@@ -108,7 +109,8 @@ function checkCss(source, rel) {
}
}
const ARBITRARY = /(?:^|[\s"'`:])!?-?[a-z][\w-]*-\[([^\]\s]+)\]/g;
// a value, not a variant: `data-[tone=fault]:` selects, it does not style
const ARBITRARY = /(?:^|[\s"'`:])!?-?[a-z][\w-]*-\[([^\]\s]+)\](?!:)/g;
function checkPlain(source, rel) {
// Comments are prose, not styling — `checkCss` already ignores them, and