refactor(web): move the stylesheet into Tailwind utilities (#281)
This commit was merged in pull request #281.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user