- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Wed, 04 Jul 2018 07:40:55 +0000
- To: public-css-archive@w3.org
The Working Group just discussed `css nesting`, and agreed to the following: * `RESOLVED: add css-nesting as an ED, Tab Atkins as editor, file issues until ppl are overall kinda happy with what it's like before we consider FPWD` <details><summary>The full IRC log of that discussion</summary> <florian> topic: css nesting<br> <florian> github: https://github.com/w3c/csswg-drafts/issues/2701<br> <florian> TabAtkins: we tried to discuss that a while back, but didn't have time to conclude. Should we rediscuss, or re-resolve<br> <TabAtkins> https://tabatkins.github.io/specs/css-nesting/<br> <florian> myles: I want an overview<br> <florian> TabAtkins: nesting style rules is a common request, and a feature of every css preporsessor in existence<br> <florian> TabAtkins: and one of their most popular feature<br> <florian> TabAtkins: makes stylesheets much easier to maintain<br> <florian> TabAtkins: it is purely syntatic sugar, but is worth covering because of the huge demand<br> <florian> TabAtkins: the way they're done in preprocessors are ambiguous with properties<br> <florian> TabAtkins: My propose spec disambiguate with by using &<br> <florian> TabAtkins: you can use & at the front, and if you want it elsewhere, you can use @nest to keep things unambiguous<br> <TabAtkins> a:hover ....<br> <florian> TabAtkins: the above looks like a "a" property with a "hover" value<br> <frremy> q+<br> <florian> TabAtkins: CSS parsing only requires a finite amount of lookahead, and we'd like to keep it that way<br> <florian> leaverou: isn't it only a problem when the tag selector is the first part of the selector<br> <florian> TabAtkins: I don't like that because it's not obvious, and hard to teach<br> <Rossen> q?<br> <florian> fantasai: you could pick a random character to start any rule with<br> <astearns> ack frremy<br> <fantasai> s/any/every/<br> <florian> TabAtkins: yes, that's what "@nest" do<br> <florian> frremy: replace @nest with &<br> <TabAtkins> & &.foo {...}{<br> <florian> TabAtkins: it's ambiguous<br> <heycam> q+<br> <florian> Florian: I don't like it, @nest is nicer<br> <florian> leaverou: that would be hard to read<br> <frremy> &:hover<br> <frremy> & > span > &<br> <florian> frremy: you only include it if needed<br> <TabAtkins> & span:not(&) {...}<br> <Rossen> q?<br> <florian> TabAtkins: other bad example ^<br> <astearns> ack heycam<br> <myles> Q+<br> <frremy> (I was convinced by the clarification that the & can be replaced more than one in the selector , which I didn't know)<br> <myles> -q<br> <florian> heycam: can we require starting with a combinator (and use an explicit descendant combinator)<br> <florian> TabAtkins: doesn't solve it for & in the middle<br> <florian> fantasai: if you use @nest, use it everywhere<br> <florian> TabAtkins: too verbose<br> <florian> heycam: @nest introduces a block?<br> <florian> leaverou: ????<br> <fantasai> s/everywhere/everywhere. If you think that's too verbose, choose a different disambiguator. Alternating between using @nest and not is not great/<br> <florian> TabAtkins: very hard to express in grammars<br> <florian> TabAtkins: in the most common cases, stating with an ampersand is short, which is important<br> <florian> fantasai: just use something shorter than @nest<br> <fantasai> s/just//<br> <florian> Florian, fantasai: how about naked @<br> <florian> myles: we don't have to bikeshed the syntax if we're just talking about adopting the module<br> <leaverou> fantasai: or naked & to introduce a nested block? /* just throwing ideas! */<br> <florian> astearns: objections?<br> <fantasai> s/fantasai:/fantasai,/<br> <florian> frremy: does it need to be a new module?<br> <florian> florian: no, but it's nice that way<br> <florian> astearns: objections?<br> <florian> fantasai: ED is fine, want to bikeshed the syntax before FPWD<br> <fantasai> fantasai: Seems like nobody is really happy with the spec as-i<br> <fantasai> s/as-i/as-is/<br> <florian> xidorn: no objection, but my concern is that it expands in some cases into :matches() like things<br> <florian> xidorn: and that's hard to optimize<br> <florian> TabAtkins: you can expand them out fully<br> <florian> emilio: how about the OM?<br> <florian> TabAtkins: not expanded in the OM<br> <florian> xidorn: that makes it hard<br> <fantasai> s/in the OM/in the OM, rules get a .childRules object/<br> <florian> xidorn: because of the combinatorial explosion<br> <florian> florian: we still have to deal with that in preprocessor generated sylesheets<br> <fantasai> ScribeNick: fantasai<br> <fantasai> astearns: Hearing no objections to starting work on the module. Hearing a lot of issues against it.<br> <fantasai> astearns: Anyone else interested in heping Tab?<br> <fantasai> RESOLVED: add css-nesting as an ED, Tab Atkins as editor, file issues until ppl are overall kinda happy with what it's like before we consider FPWD<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2701#issuecomment-402392212 using your GitHub account
Received on Wednesday, 4 July 2018 07:40:58 UTC