Skip to content

Fix cascade comments that overstate the unlayered-CSS guarantee - #30

Merged
minimaldesign merged 1 commit into
mainfrom
fix-unlayered-cascade-comments
Jul 21, 2026
Merged

Fix cascade comments that overstate the unlayered-CSS guarantee#30
minimaldesign merged 1 commit into
mainfrom
fix-unlayered-cascade-comments

Conversation

@minimaldesign

Copy link
Copy Markdown
Owner

Summary

Two comments claimed unlayered site CSS "wins over every mCSS layer". That is only true for normal declarations: every helper declaration is !important, and important layered declarations beat unlayered CSS, so helpers win over site and consumer CSS by design. The prose in docs/start ("Your CSS (unlayered)" section) and agents/css.md already state the exception correctly; these two comments contradicted them.

  • docs/start code block: now says normal declarations win over every layer, with the helpers exception spelled out.
  • _global.css: same fix, plus a corrected rationale for @layer pages. The old comment said pages exists so "helpers can still override" those rules, but helpers override unlayered rules too, so that reasoning was based on the same false premise. Pages is for site rules that should stay below your unlayered CSS while still beating the framework's components.

Comment-only change: no rendered CSS or dist output is affected.

Verification

  • npm run build passes; the rebuilt /docs/start shows the corrected code block and the old claim is gone.
  • grep -rn "wins over every" no longer matches anywhere in src.

🤖 Generated with Claude Code

Two comments claimed unlayered site CSS beats every framework layer.
That is only true for normal declarations: every helper declaration is
!important, and important layered declarations beat unlayered CSS, so
helpers win over site and consumer CSS by design (the prose in
docs/start and agents/css.md already says so).

- docs/start code block: qualify the claim and state the helpers
  exception
- _global.css: same fix, and correct the @layer pages rationale (it
  claimed pages exists so helpers can override those rules, but helpers
  override unlayered rules too; pages is for site rules that should
  stay below unlayered CSS while still beating the framework's
  components)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@netlify

netlify Bot commented Jul 21, 2026

Copy link
Copy Markdown

Deploy Preview for mcssdev ready!

Name Link
🔨 Latest commit 0a99b72
🔍 Latest deploy log https://app.netlify.com/projects/mcssdev/deploys/6a5f96fecec8200008672551
😎 Deploy Preview https://deploy-preview-30--mcssdev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 98
Accessibility: 96
Best Practices: 100
SEO: 99
PWA: 70
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@minimaldesign
minimaldesign merged commit 0a50722 into main Jul 21, 2026
5 checks passed
@minimaldesign
minimaldesign deleted the fix-unlayered-cascade-comments branch July 22, 2026 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant