Add a Stylelint rule to enforce using space tokens
Categories
(Developer Infrastructure :: Lint and Formatting, task)
Tracking
(firefox146 fixed)
| Tracking | Status | |
|---|---|---|
| firefox146 | --- | fixed |
People
(Reporter: hjones, Assigned: dwhisman)
References
(Blocks 3 open bugs)
Details
(Whiteboard: [recomp][acorntractors])
Attachments
(1 file)
We should add a Stylelint rule to enforce only using --space-* tokens for any margin-*, padding-*, *-gap, and inset-* properties. This rule may be autofixable, but it'll take some doing since we'll often be going from hardcoded px values to rem based values. That being said it might be nice to have a mapping with the values specified in comments here, so that we can autofix 8px to --space-small, for example. This work will include documentation, tests, and adding an entry to our rollouts file, but will not include expanding our token offerings or fixing any existing errors.
Out of all the rules we're adding this one feels like the one where we're most likely to introduce visual regressions when we start fixing it due to font size differences across platforms.
Updated•2 months ago
|
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Comment 1•1 month ago
|
||
- Add tests for margin shorthand
- Add tests for padding shorthand
- Add tests for inset shorthand
- Add tests for gap shorthand
- Add tests for margin/padding block/inline shorthand
- Add tests for margin/padding longhand properties
- Remove tokens-table values from auto-fixable list
- Add tests for inset block/inline, plus top, left, right, and bottom
- Add tests for column-gap and row-gap
- Add tests for keywords
- Add files to be ignored for rollout
Description
•