MSEdgeExplainers icon indicating copy to clipboard operation
MSEdgeExplainers copied to clipboard

[@sheet] What happens with multiple @sheet definitions with the same identifier?

Open aluhrs13 opened this issue 1 year ago • 1 comments

What happens with multiple @sheet definitions with the same identifier? First-definition wins, or do they get merged like @layer? Again, this was brought up in the CSSWG but not resolved (https://github.com/w3c/csswg-drafts/issues/5629#issuecomment-1498299448). Note that it's possible to have a "Flash of other-styled content" if it's last-defintion-wins, as the first definition may apply, then a later definition from an external CSS file may override it.

aluhrs13 avatar Jan 22 '25 23:01 aluhrs13

It seems like the "flash of other-styled content" case could apply even in the merge case? As in, we might discover a later definition in an external CSS file that overrides something we already know about. Or am I misunderstanding?

Initially I would lean towards last-definition-wins for consistency with things like @keyframes, but if there are use cases for merging I'd be interested to hear them.

kbabbitt avatar Jan 23 '25 16:01 kbabbitt