Open Bug 2085329 Opened 28 days ago Updated 24 days ago

Make no-base-design-tokens flag the alpha base color tokens

Categories

(Developer Infrastructure :: Lint and Formatting, task)

task

Tracking

(Not tracked)

People

(Reporter: dao, Unassigned)

References

(Blocks 1 open bug)

Details

no-base-design-tokens matches base color tokens with /var\((?<token>--color-[a-zA-Z]+-\d+)\)/g, which requires digits right after the color name. It therefore misses the alpha base tokens such as --color-black-alpha-10 and --color-white-alpha-40.

About 20 stylesheets use them directly today, including New Tab's generated CSS. Before extending the rule, decide whether the alpha tokens count as base tokens, and whether the existing uses get semantic tokens or stylelint-disable comments.

Rule: https://searchfox.org/firefox-main/rev/55c075041e43304459a082af8dfbac5f90e1a18d/tools/lint/stylelint/stylelint-plugin-mozilla/rules/no-base-design-tokens.mjs#21

You need to log in before you can comment on or make changes to this bug.