mirror of
https://github.com/Ku6epXBOCTuK/easy-png-tools.git
synced 2026-11-13 17:08:20 +00:00
chore: add lint rules, fix script\configs
This commit is contained in:
@@ -41,14 +41,14 @@ export function collectUsedTokens() {
|
||||
return used;
|
||||
}
|
||||
|
||||
// A token is "colorful" when its value is a color literal — those must have a
|
||||
// A token is "colorful" when its value is a color literal; those must have a
|
||||
// dark-mate. Non-color tokens (fonts, radii, durations) are exempt.
|
||||
const COLOR_RE =
|
||||
/#[0-9a-fA-F]{3,8}\b|\b(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklch|oklab|hct|color-mix)\s*\(/i;
|
||||
|
||||
export const isColorValue = (value) => COLOR_RE.test(value);
|
||||
|
||||
// A token is "derived" when its value references var(...) — it adapts to the
|
||||
// A token is "derived" when its value references var(...); it adapts to the
|
||||
// theme automatically, so it must NOT have a hardcoded dark twin.
|
||||
export const isDerived = (value) => value.includes("var(");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user