Skip to content

fix: drop !important declarations from theme CSS - #5

Merged
oto-macenauer-absa merged 1 commit into
masterfrom
fix/remove-important-declarations
Sep 23, 2026
Merged

oto-macenauer-absa merged 1 commit into
masterfrom
fix/remove-important-declarations

Conversation

@oto-macenauer-absa

Copy link
Copy Markdown
Collaborator

What

Clears the one warning the knowledge base contract check reports (KB-CSS-001: 3 !important declarations in theme/style.css). Follow-up to #4.

  • #topnav background / border-bottom: the Tailwind-built #topnav rule and the branded override are both unlayered with the same specificity (1,0,0). The branded one comes later, so it wins by source order. The !important was redundant.
  • [hidden]:where(:not([hidden=until-found])) { display: none }: moved out of Tailwind preflight (@layer base) into the unlayered custom section, without !important. Unlayered rules beat every layered one, so hidden still wins over utilities like .flex. Nothing in the template uses the hidden attribute today; this keeps the guarantee for pages that do.

Test

python scripts/pack.py --headless
node ../knowledge-base/actions/lib/check-cli.js --manifest kb-docs.json --dist dist

→ No findings — the built output satisfies the knowledge base contract.

Not checked in a browser (no local Chromium). Worth a quick look at the top nav colour in the preview build.

🤖 Generated with Claude Code

Clears the KB-CSS-001 warning from the knowledge base contract check.

- #topnav: both rules are unlayered with equal specificity; the branded
  one comes later, so it wins by source order without !important.
- [hidden]: moved Tailwind preflight's rule out of @layer base. Unlayered,
  it still beats every layered utility class without !important.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@oto-macenauer-absa
oto-macenauer-absa merged commit 8e9de3c into master Sep 23, 2026
1 check passed
@oto-macenauer-absa
oto-macenauer-absa deleted the fix/remove-important-declarations branch September 23, 2026 10:17
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.

2 participants