Repository navigation
Colour the pick card's report so it is easier to read - #94
Merged
Merged
Conversation
The pick card's report was one colour, so property names, values and the classes in each selector ran together. The report is now split into tokens and each kind keeps its own colour: labels are dimmed, property names, values and classes are coloured apart, and attribute tests and pseudo-classes in rule selectors stand out. Layer notes and counts are dimmed and set in italics. Style values line up in a column, and a value that wraps stays under it. Colour values, including the oklch and oklab that Tailwind uses, get a swatch over a checkerboard, so translucent colours show as such; screen readers skip it. Each time-machine terminal has its own palette: DOS colours in 1999, dark ink on white in the 2003 Mac Terminal, and xterm colours in 2002. Every token colour meets 4.5:1 on its console. The plain-text report keeps the CLI's wording apart from the aligned values. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Follow-up to #93. The pick card's report was a single colour, so property names, values and the classes in each selector ran together.
What changes
lib/pick-report.tsnow splits the report into tokens (reportTokens,selectorTokens,valueTokens), and the card gives each kind its own colour:classes,box,stylesandstyled by…are dimmed;[data-retro]and pseudo-classes like:hoverstand out within rule selectors;@layernotes and counts are dimmed and set in italics.inseton abox-shadow, hangs under its column.rgb,hsl,oklch,oklaband the other colour functions. Screen readers skip the swatch.reportLineskeeps the CLI's wording; the only change is the aligned values.Testing
npm run typecheck,npm run lintandnpm run check:auditare clean.npm testpasses 41 tests; new cases cover selector, value and line tokens and the alignment.npm run test:browserpasses 70 tests in Chromium and Firefox. The report test also checks that four token kinds have distinct colours, the swatch'saria-hiddenand paint, and the wrapped-value indent.🤖 Generated with Claude Code