Skip to content

fix(website): make redesign theme the site-wide stylesheet - #7

Merged
IamCoder18 merged 2 commits into
mainfrom
feat/redesign-site-wide-theme
Sep 11, 2026
Merged

IamCoder18 merged 2 commits into
mainfrom
feat/redesign-site-wide-theme

Conversation

@IamCoder18

Copy link
Copy Markdown
Owner

Problem

The redesign promoted in #6 renders broken in production (screenshots in #3 no longer match): wrong colors, wrong fonts, old-theme artifacts. Two compounding causes:

  1. BaseLayout loaded the old global.css (dark surfaces via tokens.css, lime link hovers, Space Grotesk/Inter) alongside the home page's redesign.css — two competing Tailwind v4 themes on one page.
  2. redesign.css still gated its dark token blocks on a .dark class, but the theme boot script and both theme toggles only set the data-theme attribute (the reconcile in feat(website): promote redesign to home page #6). Dark tokens could never activate, so shadcn tokens stayed light while dark: utilities activated — mixed states everywhere.

Fix

  • BaseLayout now imports redesign.css as the single site-wide stylesheet; global.css and tokens.css are deleted.
  • Dark token blocks in redesign.css key on :root[data-theme='dark'] (and html[data-theme='dark'] for color-scheme), matching the boot script and both toggles. Theme toggle round-trip verified (attribute + localStorage persist).
  • CDN font <link>s removed — Sora / Geist / JetBrains Mono ship via fontsource imports in redesign.css.
  • Remaining pages (docs, install, changelog, community, 404) and shared chrome (Nav, Footer, ThemeToggle, Search dialog) restyled onto the redesign's semantic tokens (--background, --card, --muted, --primary, --muted-foreground…). Prose links and inline code get scoped styles so the home page is untouched.
  • Orphaned old-design components/marketing/* (unreferenced anywhere since feat(website): promote redesign to home page #6) removed.
  • Bonus: changelog bullets now render **bold** / `code` instead of raw markdown (visible literal asterisks on /changelog).

Verification

  • npm run build clean, 29 pages.
  • Screenshotted home, docs index, a docs article, install, changelog, community, and 404 in both themes — all cohesive Synaptic Cyan, no console/page errors.
  • Theme toggle on /install flips data-theme and persists to localStorage['synapse-theme'].

Closes the regression reported against #3 (prod mismatch).

The home page regressed because BaseLayout loaded the old global.css
alongside redesign.css, and redesign.css still keyed its dark tokens on
a .dark class that nothing set anymore (the boot script and both toggles
only set data-theme). The result was light tokens mixed with old dark
surfaces and lime link colors.

- BaseLayout imports redesign.css; global.css and tokens.css deleted
- redesign.css dark token blocks now key on :root[data-theme='dark']
- CDN font links dropped; Sora/Geist/JetBrains Mono come from
  fontsource imports in redesign.css
- Nav, Footer, ThemeToggle, Search, and the docs/install/changelog/
  community/404 pages restyled onto the redesign tokens; prose links
  and inline code get scoped styles so the home page is untouched
- orphaned old-design marketing components removed
- changelog bullets render **bold** and `code` instead of raw markdown
@coderabbitai

coderabbitai Bot commented Sep 11, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 1 minute.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 8dbafc79-1774-470c-857a-b4cf8c6ae076

📥 Commits

Reviewing files that changed from the base of the PR and between 6ae1b8c and 483d790.

📒 Files selected for processing (22)
  • website/src/components/layout/BaseLayout.astro
  • website/src/components/layout/Footer.astro
  • website/src/components/layout/Nav.astro
  • website/src/components/layout/ThemeToggle.astro
  • website/src/components/marketing/ArchitectureDiagram.astro
  • website/src/components/marketing/ComparisonTable.astro
  • website/src/components/marketing/FeatureGrid.astro
  • website/src/components/marketing/Hero.astro
  • website/src/components/marketing/InstallSnippet.astro
  • website/src/components/marketing/LiveCodePreview.astro
  • website/src/components/marketing/SafetyPillars.astro
  • website/src/components/react/Search.tsx
  • website/src/pages/404.astro
  • website/src/pages/changelog.astro
  • website/src/pages/community.astro
  • website/src/pages/docs/[...slug].astro
  • website/src/pages/docs/index.astro
  • website/src/pages/index.astro
  • website/src/pages/install.astro
  • website/src/styles/global.css
  • website/src/styles/redesign.css
  • website/src/styles/tokens.css

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Comment thread website/src/pages/changelog.astro Outdated
.cl__rel { background: var(--surface-1); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem 1.8rem; margin-bottom: 1.5rem; }
.cl__rel--latest { border-color: var(--signal-bright); }
.cl__head p { color: var(--muted-foreground); margin-top: 0.6rem; }
.cl__head a { color: var(--primary); }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: .cl__head a { color: var(--primary); } is the only head-level link rule in this PR that omits an underline. Every other page-level anchor rule added in this PR pairs the --primary color with text-decoration: underline; text-underline-offset: 3px; (404.astro:18, community.astro:77, install.astro:147, docs/[...slug].astro:167, docs/index.astro:75). Color alone is not a sufficient link indicator (WCAG 2.1 SC 1.4.1), and the Keep a Changelog link in the head is the only one currently relying solely on hue.

Suggested change
.cl__head a { color: var(--primary); }
.cl__head a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }

Reply with @kilocode-bot fix it to have Kilo Code address this issue.

padding-bottom: 0.4rem;
}
.docs-article :global(p) { line-height: 1.7; }
.docs-article :global(a) { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: The new .docs-article :global(a) rule (specificity 0,1,1) wins over the .docs-edit rule at line 202. .docs-edit sets color on the <p class="docs-edit"> wrapper, which the inner <a> only inherits; .docs-article :global(a) sets color (and text-decoration: underline) directly on the <a>. Net effect: the Edit this page on GitHub → link now renders as a primary-colored, underlined link inside the article body, instead of the muted, non-underlined secondary-action look the .docs-edit rule is trying to express. Either drop the .docs-edit color, narrow the new rule (e.g. :global(p:not(.docs-edit) a) or scope to the rendered <Content /> container), or move the edit footer outside <article class="docs-article">.


Reply with @kilocode-bot fix it to Kilo Code address this issue.

Comment thread website/src/pages/changelog.astro Outdated
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/\*\*(.+?)\*\*/g, '<strong>$1</strong>')
.replace(/`([^`]+?)`/g, '<code>$1</code>');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: The hand-rolled inline() renderer is fragile in ways the current CHANGELOG.md happens not to trigger, but the new set:html={inline(b)} path now reaches the DOM:

  • The non-greedy regex can't disambiguate nested constructs. e.g. **foo ** bar** renders as <strong>foo </strong> bar<strong> bar</strong> instead of the literal asterisks a contributor probably intended.
  • No escape handling for backticks or **. A literal ` or ** cannot be expressed in any bullet — they will always be interpreted as code/bold.
  • The order (& → < → > → ** → `) is correct for now, but any future inline construct added here must be aware that & is already escaped and that < will already be &lt;.

Worth considering a real markdown lib (marked + DOMPurify, or markdown-it) for the bullet renderer, or at minimum escaping unmatched ** and ` so future contributors can't silently corrupt rendering.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

@kilo-code-bot

kilo-code-bot Bot commented Sep 11, 2026 •

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 0

The new commit 483d790 cleanly addresses every issue raised in the prior review, and introduces no new defects in the changed code:

  • docs/[...slug].astro:168-172 — the WARNING is fixed by .docs-article :global(.docs-edit a) (specificity 0,2,2) which overrides .docs-article :global(a) (0,1,1) and adds a hover state via var(--foreground). The Edit this page on GitHub → link is now rendered as the muted, non-underlined secondary action the .docs-edit class was meant to express.
  • changelog.astro:89 — the SUGGESTION is fixed: .cl__head a now pairs --primary with text-decoration: underline; text-underline-offset: 3px;, matching every other page-level anchor rule added in this PR and satisfying WCAG 2.1 SC 1.4.1.
  • changelog.astro:9-43, 68-74 — the SUGGESTION is fixed by replacing the set:html={inline(b)} path with a tokenizer that emits Astro text/element nodes (no set:html). Unmatched ** and ` markers now stay as literal text in a text node, so arbitrary HTML in a bullet cannot reach the DOM. The greedy indexOf-based pairing handles all the cases the previous non-greedy regex got wrong without any escape handling.

Reviewed the full new tokenizeInline implementation for edge cases (nested **, backticks inside **, leading/trailing markers, mixed-marker precedence, unclosed markers) — all behave correctly for changelog content. No new bugs, no XSS surface, no CSS regressions introduced.

Files Reviewed (2 files changed since prior review)
  • website/src/pages/changelog.astro — tokenizeInline + JSX rewrite; all previous issues resolved, 0 new issues
  • website/src/pages/docs/[...slug].astro — .docs-edit a override; previous WARNING resolved, 0 new issues
Previous Review Summary (commit 9aca0d0)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 9aca0d0)

Status: 3 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 2

The PR cleanly resolves the site-wide stylesheet collision and the dark-token selector bug it describes — BaseLayout now imports redesign.css, the dark token block keys on :root[data-theme='dark']/html[data-theme='dark'], the CDN font <link>s are gone, every remaining page rethemes onto the semantic tokens, and the orphaned components/marketing/* are correctly removed. The remaining issues are local CSS-consistency and robustness items in the new code.

Issue Details (click to expand)

WARNING

File Line Issue
website/src/pages/docs/[...slug].astro 167 New .docs-article :global(a) (specificity 0,1,1) overrides the .docs-edit color at line 202, turning the "Edit this page on GitHub →" link into a primary-colored underlined link instead of the muted secondary-action look the .docs-edit class is trying to express.

SUGGESTION

File Line Issue
website/src/pages/changelog.astro 57 .cl__head a is the only new page-level anchor rule that omits an underline — inconsistent with 404.astro, community.astro, install.astro, docs/[...slug].astro, docs/index.astro (all of which pair --primary with text-decoration: underline; text-underline-offset: 3px;). Color alone fails WCAG 2.1 SC 1.4.1.
website/src/pages/changelog.astro 17 The hand-rolled inline() markdown renderer has known fragility (non-greedy regex can't disambiguate nested **…**/…, no escape handling for ` or **, brittle ordering). Current CHANGELOG.md doesn't trigger it, but the new set:html path now reaches the DOM.
Files Reviewed (22 files)
  • website/src/components/layout/BaseLayout.astro — 0 issues
  • website/src/components/layout/Footer.astro — 0 issues
  • website/src/components/layout/Nav.astro — 0 issues
  • website/src/components/layout/ThemeToggle.astro — 0 issues
  • website/src/components/marketing/ArchitectureDiagram.astro — deleted, 0 issues
  • website/src/components/marketing/ComparisonTable.astro — deleted, 0 issues
  • website/src/components/marketing/FeatureGrid.astro — deleted, 0 issues
  • website/src/components/marketing/Hero.astro — deleted, 0 issues
  • website/src/components/marketing/InstallSnippet.astro — deleted, 0 issues
  • website/src/components/marketing/LiveCodePreview.astro — deleted, 0 issues
  • website/src/components/marketing/SafetyPillars.astro — deleted, 0 issues
  • website/src/components/react/Search.tsx — 0 issues
  • website/src/pages/404.astro — 0 issues
  • website/src/pages/changelog.astro — 2 issues
  • website/src/pages/community.astro — 0 issues
  • website/src/pages/docs/[...slug].astro — 1 issue
  • website/src/pages/docs/index.astro — 0 issues
  • website/src/pages/index.astro — 0 issues
  • website/src/pages/install.astro — 0 issues
  • website/src/styles/global.css — deleted, 0 issues
  • website/src/styles/redesign.css — 0 issues
  • website/src/styles/tokens.css — deleted, 0 issues

Fix these issues in Kilo Cloud


Reviewed by minimax-m3 · Input: 0 · Output: 0 · Cached: 0

@IamCoder18

Copy link
Copy Markdown
Owner Author

Full-page screenshots (local build of this branch)

Dark (default) — home, docs index, docs article, install, changelog, community, 404. Light — home and a docs article.

dark-home.png
dark-docs-index.png
dark-docs-article.png
dark-install.png
dark-changelog.png
dark-community.png
dark-404.png
light-home.png
light-docs-article.png

- changelog: underline the Keep a Changelog head link so color isn't
  the only link indicator (matches prose links elsewhere)
- changelog: replace the set:html markdown regex with a tokenizing
  renderer; bullets render as real strong/code elements through text
  nodes, so unmatched ** and backticks stay literal and no HTML can
  reach the DOM
- docs article: scope .docs-edit a to keep the edit-on-GitHub footer
  link muted and non-underlined despite the new prose link rule
@IamCoder18
IamCoder18 merged commit c1d42f5 into main Sep 11, 2026
5 checks passed
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