Re: [csswg-drafts] [css-navigation] Concerns about `at` navigation rules creating CSS bloat (#13117)

@noamr Many tools such as Astro do already inline small CSS chunks. Go look at this page and you'll see 1 external CSS loaded and one inline style. https://astro.build/blog/whats-new-november-2025/

But you can only do this if you have first authored your CSS in a way that the tool can know what CSS is needed on each page. This proposal, without any guards for usage, will in my opinion be used as a convenient way to modify styles when on a specific page. Because developers do not think in terms of pages, they think in terms of component. So instead of `@navigation(at: home) {` with all of the home styles inside of it, they'll sprinkle usage of `@navigation` throughout their codebase to make small changes to components that need them.

The feature is *too convenient*. And it doesn't give tooling enough information to unwrap this into a sane code splitting pattern.

-- 
GitHub Notification of comment by matthewp
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13117#issuecomment-3607043408 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 3 December 2025 14:07:53 UTC