- From: Justin Fagnani via GitHub <sysbot+gh@w3.org>
- Date: Fri, 25 Apr 2025 19:49:32 +0000
- To: public-css-archive@w3.org
I guess I'm unclear on the status of the previously proposed global namespace of sheet names, where a sheet could be imported by name regardless of which outer stylesheet it came from.
What I think is important to preserve is that two separate stylesheets nested sheet names are not merged, ie:
Given:
`a.css`:
```css
@sheet foo {
p { color: red; }
}
```
`b.css`:
```css
@sheet foo {
p { font-weight: bold; }
}
```
This applies styles from both `foo` `@sheet` rules:
```css
@import foo from "a.css";
@import foo from "b.css";
```
(ie, bold and red, not just bold);
And these two JS modules get their respective `foo` sheets independently:
```ts
/* a.js */
import {foo} from './a.css';
```
```ts
/* b.js */
import {foo} from './b.css';
```
A previous version of this proposal at least put sheet names into a global list and there was an open question of how to merge sheets within that list. Both merging and list-wins in that context would cause severe problems.
--
GitHub Notification of comment by justinfagnani
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12001#issuecomment-2831308003 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 25 April 2025 19:49:32 UTC