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

There is one thing that a JS modules can, that cascade layers cannot mimmic.
In JavaScript it is possible to import a module or parts of a module while renaming those things.

This implies that two modules can export different things under the same name and that conflict resolution can be handled by the consumer.

This isn't possible in CSS.
You can pick which named thing (keyframe animation, custom property,...) is declared last and thus "wins", but you cannot use both side by side.

But it is relatively rare for such naming conflicts to occur in such a way that it cannot be resolved by the author.

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


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

Received on Thursday, 29 February 2024 15:07:27 UTC