mozilla / mozilla/protocol

Spacing scale: where do your spacing tokens live? (audit from the Rhythmguard benchmark)

Open
#1,132 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
SCSS
Stars
298
Forks
83
Avg merge
16h 48m
Merged PRs (30d)
1

Description

Spacing scale: where do your spacing tokens live? (audit from the Rhythmguard benchmark)

Hi. I maintain stylelint-plugin-rhythmguard, a Stylelint rule that checks spacing values against a project's own scale. To keep it quiet on code I do not control, I run it against public design systems on pinned commits and publish the numbers. This repository is one of them, and I would rather you saw the audit here than in a report first.

What was run. npx rhythmguard audit . --scale auto at 6bcf867 over assets/sass. Hairlines of one pixel or less, percentages, and generated or test paths are excluded. Anyone can reproduce it in a checkout of that commit.

What it found. The audit could not find a spacing token set here (it looks for --space-* / --spacing-* custom properties, Sass $spacer / $spacing-* variables and maps, or a Tailwind --spacing base), so it measured against a default 4px scale instead. Against that default it reported 18 literal values, a number that says more about my token discovery than about your CSS, so I am not treating it as a finding.

The ask. If you can point me at where the spacing scale is defined (a token file, a Sass map, a package), I will teach the tool to read it, re-run the audit on the real scale, and post the result here. If spacing is intentionally not on a scale, saying so is just as useful and I will mark the row that way.

The row for this repository will appear in a periodic "State of Spacing" table in the Rhythmguard repository, with this issue linked. If you would rather not be listed, say so here and I will remove it.

Feel free to close this if it is not useful. Thanks for the CSS.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the SCSS under assets/sass at commit 6bcf867 and look for the spacing token definitions described in the issue, including Sass variables or maps. Done means identifying the token file, map, or package for the spacing scale, or confirming that spacing intentionally has no scale and reporting that here.

Written by the indexing model from the issue text.

Assessment

Tech stack
scss
Domain
design
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.