Re: [csswg-drafts] [css-pseudo] ::selection style propagation section doesn't reflect reality in any way.

The Working Group just discussed `:selection style propagation`, and agreed to the following resolutions:

* `RESOLVED: ::selection is cleared for shipping unprefixed even though multiple impl do not follow the spec.`
* `RESOLVED: Switch to using inheritance instead of cascade.`

<details><summary>The full IRC log of that discussion</summary>
&lt;dael> Topic: :selection style propagation<br>
&lt;dbaron> and so does CSS 2.1 https://www.w3.org/TR/CSS21/cascade.html#specificity<br>
&lt;dael> github: https://github.com/w3c/csswg-drafts/issues/2474<br>
&lt;dael> emilio: No one does what spec says. So I think we should change the spec or all impl.<br>
&lt;dael> rune_: This has been a topic for multiple F2F. I think we covered it in 2010.<br>
&lt;dael> rune_: dbaron has best overview.<br>
&lt;dael> dbaron: Selection was spec in selectors 3, but didn't say what it meant. A bunc hof browsers impl something, then we tried to look at what people wanted and expected and I made a list of requirements of what it should do. I think we picked one but no one adjusted.<br>
&lt;dael> rune_: I'm not sure we picked one.<br>
&lt;dael> dbaron: I don't know. Maybe we didn't. Way selection works in most browsers isn't useful.<br>
&lt;dael> florian: I think based on thebackground fantasai spec a thing that makes sense and is useful, but it's not what browsers do today.<br>
&lt;dael> dbaron: Other question is is the thing spec compat with what's on the web today.<br>
&lt;dael> florian: I think underlying is should we try and make it useful. If we establish that's the goal by applying to qualifying selectors we accept we're willing to go into that level of complexity. If we don't accept hte premise let's not bother. Current spec had the assumption that we wanted to bother. Is that true?<br>
&lt;dael> dbaron: The thing in the spec attempts to do useful thing sfor selections and styles. Also there we features we wanted to build on top of ::selection so we can do things like styling spell check region that are on top of this feature.<br>
&lt;dael> fantasai: We added grammar and spell check.<br>
&lt;dael> emilio: Annoying part of how it's spec is you need to start resolving status to the top.<br>
&lt;dael> fantasai: There's different ways of getting same result. THere was an alternative way to have selection inherit from itself in a sep tree.<br>
&lt;dael> emilio: You have to resolve the entire tree which is different then what browsers do. I could say that, but I care about browser compat.<br>
&lt;dael> emilio: Whoever changes the impl first needs to be aware they might break.<br>
&lt;dael> florian: I don't know. It will do it wrong if you try and use it outside :selection<br>
&lt;dael> tantek: I'd rather see data on actual use.<br>
&lt;dael> TabAtkins: Argument is any current usage that would be effected is almost certainly broken.<br>
&lt;dael> tantek: You'd be fine with blink changing ::selector<br>
&lt;dael> TabAtkins: I would be fine with our impl to change, it would be better for users. Only global selection is useful right now and that wouldn't change.<br>
&lt;dael> emilio: Seems like it would make select-all sort of slow. You need to style whole page again.<br>
&lt;tantek> s/::selector/::selection<br>
&lt;dael> TabAtkins: recascade<br>
&lt;dael> emilio: You pay the cost of selecting the whole page.<br>
&lt;dael> fantasai: Don't have to recascade<br>
&lt;dael> TabAtkins: Track a full cascade<br>
&lt;dael> fantasai: ::selection has 4 properties.<br>
&lt;dael> TabAtkins: True.<br>
&lt;dael> emilio: But then special casing that.<br>
&lt;dael> fantasai: Then you just...instead of using cascading you can use inheritence through selection tree.<br>
&lt;dael> rune_: That's what presto used to do.<br>
&lt;dael> emilio: Somewhat like blink and webkit do for visible<br>
&lt;dael> rune_: Works for limited number of property<br>
&lt;dael> fantasai: Has to be limited because non-layout effecting.<br>
&lt;dael> TabAtkins: Most are already inherited. Others can be shifted.<br>
&lt;fantasai> https://drafts.csswg.org/css-pseudo/#highlight-cascade<br>
&lt;dael> fantasai: And I think there's an open issue about describing it to use inheritence.<br>
&lt;dael> fantasai: WE can do it either cascde or inheritance but you get same behavior. Main difference is if you fail.<br>
&lt;dael> fantasai: Most of the time authors are not setting the inherit keyword. Behavior between cascading and inheritance is that the inherit keywod behaves differently<br>
&lt;dael> emilio: Synth prop that are usuallyr eset but are not inherited for purpose of selection...I don't know.<br>
&lt;dael> TabAtkins: Happy to desc like that.<br>
&lt;dael> emilio: Seems hard.<br>
&lt;dael> TabAtkins: Spec text should be fine.<br>
&lt;dael> tantek: first-line has similar issues<br>
&lt;dael> TabAtkins: NOt a great example<br>
&lt;dael> tantek: Older and has more tests<br>
&lt;dael> florian: Less constrained because compat. Can effect layout.<br>
&lt;dael> tantek: If you look at the ::selection and apply them to first-line you can come up with a reasonable list.<br>
&lt;dael> florian: That the set of properties for ::selection is more constrained means you can use more mech.<br>
&lt;dael> tantek: But from user/author it's not clear it should be different then first-line<br>
&lt;dael> fantasai: I think first-line is not related because it's trying to solve different constraints<br>
&lt;dael> TabAtkins: Pretend everything is inherited make sense?<br>
&lt;dael> emilio: Will people change?<br>
&lt;dael> TabAtkins: WE should try.<br>
&lt;tantek> ::selection is only trying to solve a subset of the constraints of ::first-line, which is why it is related and worth looking at<br>
&lt;dael> florian: Is it priority or disagreement? If browsers agree but don't prioritize there are people that have fixing browsers as a bug. If the browsers will accept that behavior that's different then we would not want to do this.<br>
&lt;dael> emilio: If there's no committment to impl.<br>
&lt;dael> florian: I'm saying that there might be and a patch might be written.<br>
&lt;dael> dbaron: Other option is put a note in a spec saying it hasn't been impl and we want feedback to see if it would work out and desc the other thing.<br>
&lt;dael> florian: Other thing being only global is useful?<br>
&lt;dael> dbaron: Yeah.<br>
&lt;dael> fantasai: It's easy to describe current impl. That's easy to desc in 2 sentences and add another for why it doesn't work well.<br>
&lt;dael> fantasai: I'm with TabAtkins we should try and make it more useful and if that's in terms of inhertence that's fine.I'm with TabAtkins that impl correctly is unlikely to break anybody.<br>
&lt;dael> fantasai: I would say if you impl in a way that makes it work no one will be made at Mozilla not doing it right. You have a problem that it's prefixed in your impl. You've got compat on the basic case that works so you should unprefix. Separately then make it useful.<br>
&lt;dael> tantek: Reasonable approach. We heard existing unprefix impl are willing to change so that adds weight to Moz can unprefix assuming we're willing to change.<br>
&lt;dael> fantasai: Prop: Mozilla should unprefix ::selection impl and the spec should describe how ::selection of a child gets its parent's styles via an incoherence based mechanism<br>
&lt;dael> florian: Our process prevents Mozilla from unprefixing and we need to allow.<br>
&lt;dbaron> s/incoherence/inheritance/<br>
&lt;dael> fantasai: WE generally rec you only ship if you're reasonably complient and people are not and we're saying it's okay.<br>
&lt;dael> fantasai: ::selection is cleared for sipping unprefixed even though multiple impl do not follow the spec.<br>
&lt;dael> Rossen: Obj?<br>
&lt;dael> RESOLVED: ::selection is cleared for shipping unprefixed even though multiple impl do not follow the spec.<br>
&lt;dael> fantasai: Currently ::selection of a child is desc with cascade. There are edge cases that will behave different with inherit.<br>
&lt;dael> fantasai: Prop: is switch to describing using the ihenretenace rather then the cascade.<br>
&lt;dael> Rossen: Current resolution is about cleared for shipping so we need the second resolution to change the spec.<br>
&lt;dael> Rossen: Obj?<br>
&lt;dael> RESOLVED: Switch to using inheritance instead of cascade.<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2474#issuecomment-380369965 using your GitHub account

Received on Wednesday, 11 April 2018 08:24:47 UTC