Re: [csswg-drafts] [css-values] Computed value of a negative calc unit that doesn't allow negative lengths.

The Working Group just discussed `[css-values] Computed value of a negative calc unit that doesn't allow negative lengths.`, and agreed to the following resolutions:

* `RESOLVED: resolve to clamp negative calc unit values in context as early as possible and then return the clamped calc as a result of the computed style.`
* `RESOLVED: resolve to clamp negative calc unit values in context and simplify as early as possible and then return the clamped calc as a result of the computed style.`

<details><summary>The full IRC log of that discussion</summary>
&lt;dael> Topic: [css-values] Computed value of a negative calc unit that doesn't allow negative lengths.<br>
&lt;dael> github: https://github.com/w3c/csswg-drafts/issues/434<br>
&lt;dael> Rossen_: This was intro last week. We resolved to clamp as early as possible, but not how to return computed values based on thsi clamping. We wanted to hear about it from a few people, one of them was glazou.<br>
&lt;dael> Rossen_: That's the first topic.<br>
&lt;dael> Rossen_: Is TabAtkins or fantasai on><br>
&lt;dael> fantasai: I'm on, but no computer.<br>
&lt;dael> TabAtkins: glazou didn't respond and I haven't had time to go through and dig up previous issues. I'm fine resolving now and waiting for compalints later if there are any.<br>
&lt;dael> Rossen_: Let me get us on the resolve. Previously we said clamp negative clamp as soon as possible.<br>
&lt;dael> plinss: We didn't actually resolve.<br>
&lt;astearns> s/plinss/astearns/<br>
&lt;dael> Rossen_: Ah, thank you. So we didn't resolve. But there was consensus on clamping as early as possible, right?<br>
&lt;dael> TabAtkins: I believe so.<br>
&lt;dael> Rossen_: Proposal is negative calc units are clampped as early as possible<br>
&lt;dael> ??: per value or per prop?<br>
&lt;dael> Rossen_: I believe per value<br>
&lt;astearns> s/??/fantasai/<br>
&lt;dael> fantasai: That was key question, per property or per value<br>
&lt;dael> Rossen_: I assumed it was per value and if it was given to the property it inherits<br>
&lt;dael> astearns: Yes, it was def. per value.<br>
&lt;dael> TabAtkins: mmhmm<br>
&lt;dael> Rossen_: right<br>
&lt;dael> Rossen_: So the consensus was to try and clamp those as early as possible. There was not consensus on how to return computed values. As calc with negative value inside or return the clampped value.<br>
&lt;dael> Rossen_: So we could resolve on clamping and leave serialization out. TabAtkins or fantasai preference?<br>
&lt;dael> TabAtkins: Tha'ts fine with me. The q was if you have a calc that's 50px-2em and that's negative at calc time do we simplify to calc0px rather then keepign the original. I'm fine simplifying the internal of the calc to the clampped value. I think that's what dbaron wanted.<br>
&lt;dael> dbaron: I think clamping and simplificiation should go together. If we're clamp we should also simplify.<br>
&lt;dael> TabAtkins: That happens already, we collapse units together. But if we have units that we know will be clampped is the topic.<br>
&lt;dael> dbaron: When you can resolve between px and em and know it's negative I think you also simplify to px.<br>
&lt;dael> TabAtkins: I'm fine with that.<br>
&lt;dael> Rossen_: And the serialized value is whatever the clampped value?<br>
&lt;dael> TabAtkins: With a calc around it.<br>
&lt;dael> Rossen_: Other opinions?<br>
&lt;dael> Rossen_: Objections on resolving to clamp negative calc unit values in context as early as possible and then return the clampped calc as a resolut of the computed style.<br>
&lt;dael> RESOLVED: resolve to clamp negative calc unit values in context as early as possible and then return the clamped calc as a result of the computed style.<br>
&lt;dael> dbaron: We're saying clamp and simplify.<br>
&lt;dael> TabAtkins: Some simplification is specced. This is collapse all units together that can be figured out. So we'd collapse em with px etc.<br>
&lt;dael> fantasai: You have to do that for inheritence to work.<br>
&lt;dael> TabAtkins: Yeah.<br>
&lt;TabAtkins> Right now we already simplify calc(1px + 2px). Reoslution is to also simplify calc(1px + 1in) at computed/used value, and things like calc(1px + 1em) at the point where that's possible.<br>
&lt;dael> RESOLVED: resolve to clamp negative calc unit values in context and simplify as early as possible and then return the clamped calc as a result of the computed style.<br>
</details>


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

Received on Wednesday, 13 December 2017 17:15:34 UTC