- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Thu, 15 Sep 2022 21:47:34 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `:stylesheet`, and agreed to the following: * `RESOLVED: @scope without selector scopes to the parent of the owner node, or the containing tree if there's no owner node` <details><summary>The full IRC log of that discussion</summary> <emilio> topic: :stylesheet<br> <emilio> github: https://github.com/w3c/csswg-drafts/issues/7349<br> <emilio> miriam: this is about stylesheets in the dom and scoping<br> <emilio> ... idea is to use `:stylesheet` / `:stylesheet-parent` to select stuff inside this scope<br> <emilio> ... that would allow you to scope the stylesheet<br> <emilio> ... most usecases prefer the stylesheet parent<br> <emilio> ... I don't have strong use cases for any<br> <fremy> huge +1<br> <emilio> fantasai: is there any use case other than implementing <style scoped>?<br> <emilio> miriam: no<br> <emilio> fantasai: then how about doing that?<br> <emilio> miriam: problem is backwards compat<br> <heycam> q+<br> <emilio> ... if scope is not recognized it's applied unscoped<br> <emilio> fantasai: can we use empty @scope rule for this?<br> <emilio> miriam: I like it<br> <emilio> ... we'd be setting aside being able to select the stylesheet's sibling<br> <Rossen_> ack heycam<br> <emilio> heycam: 2 things, does @scope nest? What would it mean if you would use @scope without a selector, would it be sensible?<br> <heycam> emilio: it would have sensible behavior<br> <heycam> ... the rule wouldn't apply, you would apply both filters<br> <emilio> heycam: second point is that there are stylesheets without nodes (constructable stylesheets)<br> <emilio> ... so we'd need to decide what it does<br> <heycam> emilio: it could also do nothing. just not match.<br> <heycam> fremy: this is in @scope<br> <heycam> emilio: so it would always match<br> <heycam> emilio: is <style scoped> really not possible?<br> <heycam> ... layers have the same issue<br> <heycam> ... you use layers<br> <heycam> miriam: if we get the media attribute extended to support supports(), then the media attribute can fail, and stop the style sheet from being applied<br> <heycam> ... you could use that along with the new attribute<br> <heycam> ... that's the proposal for layers and scope attributes<br> <heycam> emilio: I don't think any engine keeps around the DOM node deep enough, it could be done<br> <heycam> miriam: it has a bit less flexibility than what Tab was suggesting, where you could still apply a lower boundary<br> <heycam> ... while letting the upper boundary be applied by the position of the style sheet<br> <heycam> ... since lower boundaries is a bit part of what scoping provides, that might be a reason to go with the change to the @scope rule<br> <heycam> emilio: if I had to choose between :stylesheet and @scope, I'd go for @scope<br> <heycam> chrishtr: for the bottom or the top of the scope?<br> <emilio> miriam: the top, if you use no selector it'd use the parent of the <style> / <style> element as the scope root<br> <emilio> fantasai: if your <link> is in your <head> it doesn't accomplish very much<br> <emilio> chrishtr: what about constructable stylesheets?<br> <fantasai> s/it does/the stylesheet does/<br> <emilio> heycam: you need to define it but I think it logically shouldn't scope to anything<br> <emilio> chrishtr: could you add a `scope` property to the stylesheet to be able to scope a constructable stylesheet?<br> <emilio> heycam: yeah that should be doable<br> <dbaron> (leaving meeting now, probably back around 5pm)<br> <emilio> miriam: do we want links in <head> to also style the whole doc?<br> <emilio> fantasai: I don't think you want to do that, it'd just end up not styling anything<br> <fantasai> s/anything/much of anything/<br> <emilio> RESOLVED: @scope without selector scopes to the parent of the owner node, or the containing tree if there's no owner node<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7349#issuecomment-1248666611 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:47:36 UTC