René's URL Explorer Experiment


Title: create: scaffold's unlayered body styles defeat its own @layer base rules (and any shadcn theme) · Issue #511 · TanStack/cli · GitHub

Open Graph Title: create: scaffold's unlayered body styles defeat its own @layer base rules (and any shadcn theme) · Issue #511 · TanStack/cli

X Title: create: scaffold's unlayered body styles defeat its own @layer base rules (and any shadcn theme) · Issue #511 · TanStack/cli

Description: Which project does this relate to? Create Tanstack App Describe the bug The generated src/styles.css has an unlayered body rule that permanently defeats the @layer base { body { … } } rule further down in the same file. @import 'tailwind...

Open Graph Description: Which project does this relate to? Create Tanstack App Describe the bug The generated src/styles.css has an unlayered body rule that permanently defeats the @layer base { body { … } } rule further ...

X Description: Which project does this relate to? Create Tanstack App Describe the bug The generated src/styles.css has an unlayered body rule that permanently defeats the @layer base { body { … } } rule further ...

Opengraph URL: https://github.com/TanStack/cli/issues/511

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"create: scaffold's unlayered body styles defeat its own @layer base rules (and any shadcn theme)","articleBody":"### Which project does this relate to?\n\nCreate Tanstack App\n\n### Describe the bug\n\nThe generated `src/styles.css` has an unlayered `body` rule that permanently defeats the `@layer base { body { … } }` rule further down in the same file.\n\n`@import 'tailwindcss'` sets up `@layer theme, base, components, utilities`. Unlayered CSS outranks all layered CSS, so in a fresh scaffold:\n\n```css\n/* line 166 — unlayered → wins */\nbody {\n  margin: 0;\n  color: var(--sea-ink);\n  font-family: var(--font-sans);\n  background-color: var(--bg-base);\n  background: radial-gradient(...);\n}\n\n/* line 339 — layered → can never take effect */\n@layer base {\n  body {\n    background-color: var(--background);\n    color: var(--foreground);\n  }\n}\n```\n\nThe `@layer base` block is dead code as shipped — `--background` and `--foreground` never reach `body`.\n\nThis becomes a functional bug with the shadcn add-on. `shadcn apply --preset \u003ccode>` writes its theme into those same custom properties, so applying any preset from ui.shadcn.com/create has no visible effect:\n\n- `--background` / `--foreground` lose to `--bg-base` / `--sea-ink`\n- the preset's font loses too — presets emit `@layer base { html { @apply font-serif } }`, which the unlayered `body { font-family: var(--font-sans) }` (line 169) overrides\n- `a { color: var(--lagoon-deep) }` (line 208, unlayered) overrides the theme's link colour\n\nThe CLI prints \"Preset applied successfully.\", the values written are correct, and the build passes. The page just doesn't change. Reproduces with `apply \u003ccode>`, `--only theme`, and `--only theme,font`.\n\n### Your Example Website or App\n\nN/A — this is a `create` scaffolding bug. It happens when the project is generated, so there's no app to link. See Steps to Reproduce.\n\n### Steps to Reproduce the Bug or Issue\n\n```bash\nnpx @tanstack/cli@latest create demo \\\n  --framework react --non-interactive --add-ons shadcn \\\n  --no-examples --package-manager npm --toolchain eslint --no-git --no-intent\n\ncd demo\n\n# any preset code from https://ui.shadcn.com/create\nnpx shadcn@latest apply --preset b5VsmmRNAG -y\n\nnpm run build\ngrep -o \"body{[^}]*}\" dist/client/assets/styles-*.css\n```\n\nActual output — four `body` rules, the shadcn one first and losing to three unlayered ones:\n\n```css\nbody{background-color:var(--background);color:var(--foreground)}                 /* @layer base — loses */\nbody{color:var(--sea-ink);background-color:var(--bg-base);background:radial-…}   /* unlayered   — wins  */\nbody{background:radial-gradient(…)}                                             /* unlayered   — wins  */\nbody{-webkit-font-smoothing:antialiased;overflow-x:hidden}                       /* unlayered           */\n```\n\nVisually: the page renders the scaffold's teal/green palette and Manrope, not the selected preset's palette and font.\n\n### Expected behavior\n\nThe `@layer base` rules the template itself ships should be able to take effect,\nand an applied shadcn preset should govern the page's colours and font.\n\nConcretely: after `shadcn apply`, `body` should resolve to the preset's\n`--background` / `--foreground`, and the preset's font should apply — instead of\nbeing silently overridden by the scaffold's own unlayered decorative rules.\n\n### Screenshots or Videos\n\n_No response_\n\n### Platform\n\nOS: macOS 27.0 (build 26A428), Darwin 27.0.0, arm64\nNode: 24.14.1\nnpm: 11.16.0\n@tanstack/cli: 0.71.0\n@tanstack/create: 0.70.0\nshadcn: 4.21.0\ntailwindcss: 4.1.18\nvite: 8.0.0\nreact: 19.2.0\n\n### Additional context\n\n_No response_","author":{"url":"https://github.com/mishucodes","@type":"Person","name":"mishucodes"},"datePublished":"2026-09-16T19:47:15Z","url":"https://github.com/TanStack/cli/issues/511"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:d6a2b3ea-30d8-878f-44ff-4cc7f82cee20
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idEAD8:33FBDD:2535535:30F9012:6AF99E3B
html-safe-nonce48cab35a983895b6003c05378dbd2fb787aef6481a87ab3e66fd43c430180569
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQUQ4OjMzRkJERDoyNTM1NTM1OjMwRjkwMTI6NkFGOTlFM0IiLCJ2aXNpdG9yX2lkIjoiNDA1NjYwOTgxNDU2OTAzNzQwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac03bde6c783e3c15aa05341188b27185d6ba8604cdab757e64c6fc077404a50b3
hovercard-subject-tagissue:5479197151
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/TanStack/cli/511/issue_layout
twitter:imagehttps://opengraph.githubassets.com/9f839c7f75b5427c039dd79adfb749d6e230259d23eef34f4e1257052d1c9e16/TanStack/cli/issues/511
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/9f839c7f75b5427c039dd79adfb749d6e230259d23eef34f4e1257052d1c9e16/TanStack/cli/issues/511
og:image:altWhich project does this relate to? Create Tanstack App Describe the bug The generated src/styles.css has an unlayered body rule that permanently defeats the @layer base { body { … } } rule further ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemishucodes
hostnamegithub.com
expected-hostnamegithub.com
None612d3e6ffd693e7ea8d9fcf452370995872baef31d825b1fedef704cd3d24ac7
turbo-cache-controlno-preview
go-importgithub.com/TanStack/cli git https://github.com/TanStack/cli.git
octolytics-dimension-user_id72518640
octolytics-dimension-user_loginTanStack
octolytics-dimension-repository_id932949058
octolytics-dimension-repository_nwoTanStack/cli
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id932949058
octolytics-dimension-repository_network_root_nwoTanStack/cli
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release072e34035c13c31543fba9f025cbbbda4210dae4
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/TanStack/cli/issues/511#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FTanStack%2Fcli%2Fissues%2F511
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FTanStack%2Fcli%2Fissues%2F511
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=TanStack%2Fcli
Reloadhttps://github.com/TanStack/cli/issues/511
Reloadhttps://github.com/TanStack/cli/issues/511
Reloadhttps://github.com/TanStack/cli/issues/511
TanStackhttps://github.com/TanStack
clihttps://github.com/TanStack/cli
Codehttps://github.com/TanStack/cli
Issues13 (13)https://github.com/TanStack/cli/issues
Pull requests23 (23)https://github.com/TanStack/cli/pulls
Discussionshttps://github.com/TanStack/cli/discussions
Actionshttps://github.com/TanStack/cli/actions
Projectshttps://github.com/TanStack/cli/projects
Security and qualityhttps://github.com/TanStack/cli/security
Insightshttps://github.com/TanStack/cli/pulse
https://github.com/TanStack/cli
New issuehttps://github.com/login?return_to=https://github.com/TanStack/cli/issues/511
New issuehttps://github.com/login?return_to=https://github.com/TanStack/cli/issues/511
create: scaffold's unlayered body styles defeat its own @layer base rules (and any shadcn theme)https://github.com/TanStack/cli/issues/511#top
https://github.com/mishucodes
mishucodeshttps://github.com/mishucodes
on Sep 16, 2026https://github.com/TanStack/cli/issues/511#issue-5479197151
mishucodeshttps://github.com/mishucodes
not plannedhttps://github.com/TanStack/cli/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Anot-planned
on Oct 18, 2026https://github.com/TanStack/cli/issues/511#event-33574267468
Sign up for freehttps://github.com/signup?return_to=https://github.com/TanStack/cli/issues/511
Sign in to commenthttps://github.com/login?return_to=https://github.com/TanStack/cli/issues/511
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.