Skip to content

fix: kill the CSS specificity bug#3

Merged
XircTwerk merged 1 commit intomainfrom
claude/grammi-ai-platform-mXNkV
Mar 2, 2026
Merged

fix: kill the CSS specificity bug#3
XircTwerk merged 1 commit intomainfrom
claude/grammi-ai-platform-mXNkV

Conversation

@XircTwerk
Copy link
Copy Markdown
Owner

Root cause:
globals.css had * { margin: 0; padding: 0 } as unlayered CSS.
In Tailwind v4, all utilities live in @layer — unlayered rules always
win, so mx-auto, px-, py-, p-, gap- were all silently overridden.
That's why everything was left-aligned with the right half empty.

Fix in globals.css:

  • Keep only box-sizing: border-box on * (Tailwind Preflight handles the rest — no need to fight it)
  • Remove overflow-x: hidden from html/body (was hiding valid content)
  • Add .page-wrap as an unlayered centering helper that can't be broken by Tailwind layer ordering

Landing page redesign:

  • Every section uses .page-wrap for reliable 1280px centered layout
  • Hero: full-screen gradient, large 5xl–7xl headline, stats row
  • Featured agents: rich 3-column cards with icon, stats bar, rating
  • Category pills: horizontal scrollable tag cloud
  • Trust section: 2-col (copy + live metrics panel)
  • Testimonials: 3-col with attribution
  • Pricing: 3 plans, properly full-width to max-w-5xl
  • Final CTA: full-bleed glass card with ambient glow
  • All responsive: 1→2→3→4 col grids at sm/lg breakpoints

Root cause:
  globals.css had `* { margin: 0; padding: 0 }` as unlayered CSS.
  In Tailwind v4, all utilities live in @layer — unlayered rules always
  win, so mx-auto, px-*, py-*, p-*, gap-* were all silently overridden.
  That's why everything was left-aligned with the right half empty.

Fix in globals.css:
  - Keep only `box-sizing: border-box` on * (Tailwind Preflight handles
    the rest — no need to fight it)
  - Remove overflow-x: hidden from html/body (was hiding valid content)
  - Add .page-wrap as an unlayered centering helper that can't be broken
    by Tailwind layer ordering

Landing page redesign:
  - Every section uses .page-wrap for reliable 1280px centered layout
  - Hero: full-screen gradient, large 5xl–7xl headline, stats row
  - Featured agents: rich 3-column cards with icon, stats bar, rating
  - Category pills: horizontal scrollable tag cloud
  - Trust section: 2-col (copy + live metrics panel)
  - Testimonials: 3-col with attribution
  - Pricing: 3 plans, properly full-width to max-w-5xl
  - Final CTA: full-bleed glass card with ambient glow
  - All responsive: 1→2→3→4 col grids at sm/lg breakpoints

https://claude.ai/code/session_01S9BUbPuwYCRbbtqiSvAARX
@XircTwerk XircTwerk merged commit 31b427f into main Mar 2, 2026
1 of 2 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.

2 participants