Re: [csswg-drafts] [CSS Import Once] @import-once, or some syntax for importing a stylesheet only once (#6130)

Hi Emilio, good questions.

>     * What is the "deduplication key", just the whole resolved URI? That is potentially problematic if the same URI is imported from two different-origin stylesheets, I think...

I think this is exactly the purpose of this proposal.
Both require this stylesheet, but do not override any rules that may have been changed.....
 
>     * Is there any precedent in CSS where the _first_ occurrence of something wins? Don't get me wrong, that is the only reasonable way to implement this I think, but seems like a weird thing which I'm not sure has a precedent.

It also worked with es-modules.
And you can see that there is a need for this by the fact that both Less and Sass do exactly this.

>     * What happens if you import once conditionally, but with different conditions? What if those conditions change?

Only the first appearance of @import_once should be taken into account.
This way, anyone who needs the stylesheet can still modify its rules, even if conditions vary over time.



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


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

Received on Thursday, 14 December 2023 07:40:15 UTC