- From: Noam Rosenthal via GitHub <noreply@w3.org>
- Date: Tue, 18 Nov 2025 14:21:28 +0000
- To: public-css-archive@w3.org
My view about this, after pondering it a bit, is that I question whether having separate `page1.css`, `page2.css` files is both common and a best practice.
For pages that have shared styles, e.g. for common UI elements or a design system, most of the CSS would be shared anyway, and having `@navigation (at: home) {}` or `if(navigation(at: home))` conditionals would allow easy "escapes" from that commonality when needed.
If using separate styles per-page, I don't usually see the point in externalizing the file to a separate CSS in the first place, over inlining it in the HTML.
In addition, there is a separate proposal to allow any conditionals in link elements and `@import` (https://github.com/whatwg/html/issues/7540).
So the following would be possible, and would neatly apply to both MPAs and SPAs:
```html
<link rel=stylesheet href="home.css" condition="navigation (at: home)">
```
--
GitHub Notification of comment by noamr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13117#issuecomment-3547846978 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 18 November 2025 14:21:29 UTC