docs(kit): describe what a token does, not which look uses it - #58
Merged
Conversation
Four comments in index.css explained a token by naming the looks that set it, so the stylesheet documented one consumer's set of themes rather than the lever itself. A project scaffolded from here has none of those names, and the comments read as notes about somebody else's product. Same tokens, described by what a theme can do with them. (cherry picked from commit 7d1a103)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Four comments in
index.cssexplained a token by naming the looks that set it:display-stretchwas "the whole distance between Blueprint's condensedcapitals and Cinematic's expanded ones"
data-cellwas "a kit decision: Console is tight, Cinematic is loose"rulewas "hairline in most kits, heavy in Editorial, double in Almanac"auto-gridwas "two columns in Cinematic and four in Blueprint"None of those names exist in this repository. They belong to one consumer's set of
themes, so the stylesheet was documenting somebody else's product rather than the
lever it actually ships, and a project scaffolded from here reads these comments
with no idea what any of it refers to.
Follows #57, which removed the last literal reference
of that kind from the README. This is the same problem in a milder form.
What changed
Comments only. No token, value, selector or class is touched, so the built CSS is
byte for byte what it was. Each comment now says what a theme can do with the
token: one download covering condensed through expanded, a readout wanting tight
rows against a showy theme wanting loose ones, a hairline a theme may make heavy
or double into a masthead rule, an airy theme landing on two columns where a dense
one lands on four.
Release impact
No changeset. Comments do not reach a scaffolded project's behaviour.
Checks
npm run validateandnpm run format:checkboth pass. The two template copiesare synced from
shared/react-appas usual, which is why three files change forone edit.