docs: CSS source cleanup — comment-only fixes (SL-001..005) - #475
jackgranatowski merged 3 commits into
Conversation
Comment-only changes across core/*.css, no selector/property/value diffs (verified: npm run build's badge-optimal.json is byte-identical). - SL-001: cross-link the duplicated dark/light OKLCH clamp() derivation formula between core/tokens.css:364-373 (inside light-dark()) and core/themes.css's SECTION-LEVEL THEMING block (flat re-declaration for [data-theme] overrides on non-:root elements). Left unmerged per the audit's open question - themes.css genuinely needs flat values outside light-dark(), so this may be intentional; deferred to the maintainer. - SL-002: doc-comment above .sf-clickable-parent warning against applying it to large (100+ node) grids, since its selectors combine multiple :has() branches. - SL-003: strengthen --sf-is-dark's "internal, don't set directly" comment to be unmistakable against the immediately-following --sf-is-active/-current/-pressed/-open block's "public hooks" comment - same --sf-is-* naming pattern, opposite contract. Grepped every var(--sf-is-dark) read site first to confirm nothing external sets it. - SL-004: add short section labels to core/layout.css's 11 previously unlabeled blank-line section dividers, matching sibling files' style. - SL-005: consolidate the "var() not allowed inside @container" note (previously stated at only 1 of 4 @container sites) into one comment near the top of core/layout.css. Adding SL-004's /* Section */ label directly above .sf-section shadowed gen-api-index.js's fallback-to-previous-description logic for the uncommented .sf-section--guttered sitting in the same section (its description regenerated as the literal string "Section" instead of its existing curated text). Fixed by promoting that description into docs/token-annotations.json's classes overlay - the durable, intended mechanism for exactly this - rather than removing the section label. Verified: lint:css, build, test:unit, check:llm-guide, audit:check all pass; docs/api-index.json, docs/api-index.md, and the configurator's generated data files are byte-identical to base after the fix.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PR Summary by QodoDocs: Clarify core CSS comments and preserve generated API annotations (SL-001..005)
AI Description
Diagram
High-Level Assessment
Files changed (5)
|
Code Review by Qodo
Context used✅ Compliance rules (platform):
6 rules 1.
|
core/themes.css's cross-link to core/tokens.css cited a specific line range (364-373) that will drift as either file is edited independently. Replaced with a stable text anchor (the section's own comment text) to search for instead, matching how the tokens.css side already referenced themes.css by section name (SECTION-LEVEL THEMING) rather than by line number. Caught by Qodo's review on PR 475.
…r commit A stray 'rm -rf badges' before rebuilding removed the tracked badge-optimal.json along with the gitignored bundle files, and the subsequent commit picked up the deletion. Restoring it unchanged - no content difference, it was regenerated identically by npm run build.
04f2fc5
into
claude/pr-469-audit-rebase-ggp0e4
PR1 from the technical-debt audit remediation plan (#469): CSS source cleanup,
core/only. Targets the integration branchclaude/pr-469-audit-rebase-ggp0e4, notmain— this and subsequent themed PRs will accumulate there before one final PR merges the whole batch tomain.Comment-only — no selector/property/value changes.
Findings addressed
clamp()derivation formula betweencore/tokens.css(insidelight-dark()) andcore/themes.css(flat re-declaration needed for[data-theme]overrides on non-:rootelements). Left unmerged per the audit's own open question about whether the duplication is intentional — deferring that to you rather than guessing..sf-clickable-parentwarning against large (100+ node) grids, since its selectors combine multiple:has()branches.--sf-is-dark's "internal, don't set directly" comment so it's unmistakable against the immediately-following public--sf-is-active/-current/-pressed/-openblock (same naming pattern, opposite contract). Grepped everyvar(--sf-is-dark)read site first — nothing external sets it.core/layout.css's 11 previously-unlabeled blank-line section dividers.var()not allowed inside@container" note (previously stated at only 1 of 4@containersites) into one comment near the top ofcore/layout.css.A side effect worth calling out
Adding SL-004's
/* Section */label directly above.sf-sectionshadowedgen-api-index.js's fallback-to-previous-description logic for the uncommented.sf-section--gutteredclass sitting in the same section — its generated description would have regenerated as the literal string"Section"instead of its existing curated text. Fixed by promoting that description intodocs/token-annotations.json'sclassesoverlay (the durable, intended mechanism for exactly this) rather than dropping the section label. Worth knowing about if more section labels get added elsewhere later — same shadowing risk applies to any uncommented class sharing a section with a newly-labeled one.Verification
npm run lint:css,npm run build— cleannpm run test:unit— 31/31 passnpm run check:llm-guide,npm run audit:check— passdocs/api-index.json,docs/api-index.md, and the configurator's generated data files are byte-identical to base after the token-annotations.json fixGenerated by Claude Code