Re: [csswg-drafts] [css-ui] The computed value rules of user-select is problematic. (#3344)

The CSS Working Group just discussed `The computed value rules of user-select is problematic`, and agreed to the following:

* `RESOLVED: auto computes to auto, but the used value does what it currently says auto computes to`

<details><summary>The full IRC log of that discussion</summary>
&lt;myles__> Topic: The computed value rules of user-select is problematic<br>
&lt;emilio> github: https://github.com/w3c/csswg-drafts/issues/3344<br>
&lt;myles__> emilio: user-select is messy. It’s inherited in some engines, but not in others. It has different initial values in some. I wanted to make it less insane, but the spec specifies that the initial value of the property si different depending on the element, which is not great.<br>
&lt;myles__> emilio: Depending on whether the element is editable or not, the initial value is different. I like when my initial styles are all shared.<br>
&lt;myles__> emilio: There is an unspecified value, but it computes to something at computed value times, was to support user-select:contain, IIRC<br>
&lt;myles__> emilio: I don’t want the computed value to be differ depending on which element the style applies to. We should do something closer to what Gecko does, which is close to WebKit and Blink. The initial value is auto, and once you specify it, that inherits down the tree<br>
&lt;myles__> emilio: Proposal is to make it non-inherited. Initial value is auto, and auto behaves differently depending on which element it applies to at used-value time<br>
&lt;myles__> florian: I was on an agreement rollercoaster<br>
&lt;myles__> florian: user-select:contain, only Edge exposes as a value, but all browsers have as a behavior. This is how selection works when you’re in an editable element. Selection can’t escape that element. All browsers do that. In Edge, that’s explained by the user-select:contain<br>
&lt;myles__> florian: Now that it’s a value, you can apply that value to other things.<br>
&lt;myles__> florian: Maybe you want to contain your selection to the body of content, so you don’t select UI<br>
&lt;myles__> florian: Maybe we need selective inheritance. All values inherit, except “contain”<br>
&lt;myles__> florian: Propagation would work this way. So the child of contain should be something else, but otherwise things inherit normally. At computed-value time this would be easier. If from an implementor point of view at used-value time is simpler, okay<br>
&lt;myles__> florian: It’s almost the same thing.<br>
&lt;myles__> florian: To support user-select:all, you might have to implement it anyway. The user difference is inexistant. Is it simpler in other engines?<br>
&lt;myles__> emilio: The current spec says “the property is reset in certain places, the property is not inherited, all values except contain effectively inherit, so you end up needing to change all engines to copy-on-write, which WebKit, blink, and Gecko do<br>
&lt;myles__> florian: it’s not inherited. If the value is auto, look at the parent.<br>
&lt;myles__> koji: Blink already experienced that once before, but used value is easier for us, too<br>
&lt;myles__> florian: okay<br>
&lt;myles__> emilio: Using this at computed value time means it breaks style system optimizations that assume non-inherited styles change, don’t need to restyle children.<br>
&lt;myles__> emilio: Also, given the initial value depends on the element it applies to, you no longer have a canonical initial value representation. Used value is better<br>
&lt;myles__> florian: Is it reasonable to assume webkit’s cooperation?<br>
&lt;myles__> astearns: proposed resolution: auto computes to auto, but the used value does what it currently says auto computes to<br>
&lt;myles__> dholbert: This needs to be reflected in the used value, too<br>
&lt;myles__> RESOLVED: auto computes to auto, but the used value does what it currently says auto computes to<br>
&lt;myles__> florian: There is some more magic here. Currently, on editable elements, the computed value is always contain, regardless. Should we keep it at computed value time or used?<br>
&lt;myles__> emilio: UA rule, so it can be override it.<br>
&lt;myles__> florian: We didn’t want it to be overridable<br>
&lt;myles__> emilio: Gecko allows it to be overridden. But it’s fine<br>
&lt;heycam> ScribeNick: heycam<br>
</details>


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

Received on Tuesday, 26 February 2019 22:17:45 UTC