- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Thu, 15 Sep 2022 21:23:52 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `scoping rules from @import`, and agreed to the following: * `RESOLVED: add scope() to @import syntax` <details><summary>The full IRC log of that discussion</summary> <emilio> Topic: scoping rules from @import<br> <emilio> Github: https://github.com/w3c/csswg-drafts/issues/7348<br> <emilio> miriam: similar to layer() in @import<br> <emilio> ... and upcoming layer in <link><br> <emilio> ... there's a proposal to add scoping to a sheet when it's scoped<br> <emilio> ... proposal is to put the scoping condition in @scope<br> <emilio> ... and put it inside of a function<br> <emilio> ... so @import "url" scope(<root> to <lower>);<br> <emilio> ... we might want the same for html<br> <emilio> ... if you're only using scope you need double parens<br> <emilio> ... which is a bit ackward<br> <emilio> ... but proposal is to add the scope() function and maybe a shorthand for that awkward case<br> <emilio> q+<br> <heycam> emilio: this feels a bit more similar to @container or such, than @layer<br> <heycam> ... I feel it's a bit awkward. when would you want to scope a whole style sheet?<br> <Rossen_> ack emilio<br> <heycam> miriam: this would be particularly useful for systems that are currently modular / separate style sheets per component<br> <heycam> ... we could take those separate sheets, apply a scope as importing them<br> <heycam> emilio: could use shadow DOM<br> <heycam> miriam: other way is to wrap it in a file<br> <heycam> emilio: seems like a weird thing to have a shorthand for<br> <heycam> ... but if you say it's useful<br> <heycam> emilio: it feels weird in the sense it's depends on the DOM you're styling, rather than layer or media, where it's more about the style sheet itself and the environment<br> <heycam> miriam: I'll say people are going to do this. they have other methods to do it. I don't feel strongly we need this one, but it will keep coming up<br> <heycam> ... do we want to provide it as a shorthand?<br> <heycam> emilio: should we encourage it?<br> <heycam> ... if you want this kind of scoping for your whole style sheet, you may just want to use shadow DOM and drop the style sheet there<br> <heycam> miriam: scope is fairly different from shadow DOM<br> <heycam> ... you could make a fair argument that if the style sheet is meant to be scoped then it should be inside the style sheet<br> <heycam> ydaniv: it might not be your style sheet<br> <heycam> emilio: I get wanting to use teh style sheet only when I'm printing, or to put it in this layer, but I want to scope this whole style sheet, since it depends on what selectors you're scoping it to<br> <heycam> chrishtr: seems like it's the same as @scope<br> <heycam> ... it's just for a whole file<br> <heycam> ... that could be convenient<br> <heycam> ... if we accept the general usefulness of scoping, which I think it is, we should provide primitives to make that easier<br> <heycam> ... this seems like a natural extension to that<br> <heycam> emilio: you could make the same argument for container<br> <heycam> emilio: to me, @scope and @container are more similar than @scope and @media<br> <heycam> ydaniv: it's more like @layer<br> <heycam> emilio: do you think so?<br> <heycam> ... @layer doesn't change whether something matches or not<br> <heycam> chrishtr: it's scoping to different subtrees<br> <heycam> emilio: not objecting<br> <emilio> RESOLVED: add scope() to @import syntax<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7348#issuecomment-1248646574 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 15 September 2022 21:23:54 UTC