refactor(css): tokenize index.css value-exact literals (#3, option 2)#102
Merged
Conversation
…e-callout exception Audit item #3, option 2 (partial tokenize + documented exception). Replaced the 11 raw literals that map to an exact-value mm-design token and are semantically coherent: - #ffffff body background -> var(--mm-color-background) - #ffffff table-header text -> var(--mm-color-white) - #374151 prose body text -> var(--mm-color-gray-700) - #111827 prose h2 -> var(--mm-color-gray-900) - #4b5563 prose h3 -> var(--mm-color-gray-600) - #111111 prose strong -> var(--mm-color-text-primary) - #e5e7eb borders (x4) -> var(--mm-color-gray-200) - #6b7280 muted text (x2) -> var(--mm-color-gray-500) - #f9fafb stat-card bg -> var(--mm-color-gray-50) - #0047ba callout border -> var(--mm-color-blue) - #cf3339 callout border -> var(--mm-color-red) - #427c42 callout border -> var(--mm-color-green) The two #ffffff uses were mapped to different tokens on purpose (background vs white) so page background and text-on-blue do not couple to one token. Left as documented raw literals (no exact mm-design token): the bespoke prose-callout palette of 11 background/text shades. A comment block above the prose section explains the deferred-promotion exception (cross-repo, dep pinned v0.2.0). Co-Authored-By: Claude Opus 4.8 <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.
Third PR of the Phase 18 consolidation program. Value-preserving: every replacement is an exact-value mm-design token.
Replaced (11 literals)
Body bg ->
--mm-color-background; table-header text ->--mm-color-white; prose text/headings ->--mm-color-gray-700/900/600; strong ->--mm-color-text-primary; borders ->--mm-color-gray-200; muted text ->--mm-color-gray-500; stat-card bg ->--mm-color-gray-50; callout accent borders ->--mm-color-blue/red/green.The two
#ffffffuses were deliberately mapped to different tokens (backgroundvswhite) so page background and text-on-blue do not couple.Semantic-mismatch flags
None withheld. The only coupling risk (
#ffffffserving two roles) was resolved by splitting it into the two semantically correct tokens above, rather than collapsing both to one.Documented exception (left raw)
The bespoke prose-callout palette (11 background/text shades:
#1e3a5f #1a3a6b #eff4ff #1e3a6e #fff0f0 #7a1f22 #f0f7f0 #264726 #d4a800 #fffbea #5c4500) has no exact mm-design token. Left as raw literals with a comment block explaining the deferred cross-repo promotion (dep pinned v0.2.0). Exception, not drift.Gates
npm test -- --run: 248 passednpm run build: green🤖 Generated with Claude Code