Re: [csswg-drafts] [cssom][css-position] Resolved value of over-constrained percentages in inset properties (#3059)

The CSS Working Group just discussed `[cssom][css-position] Resolved value of over-constrained percentages in inset properties`, and agreed to the following:

* `RESOLVED: Overconstrained insets return their used value prior to adjusting for the overconstraint`

<details><summary>The full IRC log of that discussion</summary>
&lt;TabAtkins> (7 years ago!)<br>
&lt;TabAtkins> oriol: CSSOM, when ti's defining the resolved value for t/r/b/l<br>
&lt;TabAtkins> oriol: it says that if the property is over constrained, the resolved value is the computed value<br>
&lt;TabAtkins> oriol: that's a problem with relative positioning<br>
&lt;TabAtkins> oriol: with relpos you can only set one of them in a given axis<br>
&lt;TabAtkins> oriol: if you set left and right, only one works, the other is ignored<br>
&lt;TabAtkins> oriol: so it's over constrained. per spec, you get the computed value<br>
&lt;TabAtkins> oriol: but if the value is a %, then no browser gives the %. they all just resolve it to a px<br>
&lt;TabAtkins> oriol: so i had a proposed change in the issue<br>
&lt;TabAtkins> oriol: if the element is not positioned, or computed value is a length, resolved value is computed value<br>
&lt;TabAtkins> oriol: othewise, if proeprty is not over constrained, resolved value is used length<br>
&lt;TabAtkins> oriol: otherwise, resolved value is the length that would result from resolving the computed value, handling the over-constrainment<br>
&lt;TabAtkins> oriol: i think this matches browsers and covers cases<br>
&lt;astearns> ack fantasai<br>
&lt;Zakim> fantasai, you wanted to ask why we have this condition, and if we can remove it<br>
&lt;dbaron> I'd replace "over-constrainment" with "over-constraint"<br>
&lt;TabAtkins> oriol: so if you're over-cosntrained, instead of returning computed value, you resolve the computed value as if it weren't over constrained<br>
&lt;dbaron> but otherwise I think the proposal sounds reasonable if it matches implementations<br>
&lt;TabAtkins> fantasai: so computing it thru to a used value but not handling the over-constrained adjustments, that makes sense<br>
&lt;TabAtkins> fantasai: consistent with the model in level 3. in level 2 we actually changed the value of the weaker inset, now we keep it and use alignment props to positioning within that space. so i think that's better.<br>
&lt;TabAtkins> astearns: so is that actually interoperable? any impls that differ?<br>
&lt;TabAtkins> oriol: well this is from 2018 and i haven't checked recently. but i believe it matched impls back then<br>
&lt;TabAtkins> astearns: i think we could resolve on "have the spec match impls, using what Oriol outlined in their second comment". is that good enough?<br>
&lt;fantasai> PROPOSED: Overconstrained insets return their used value prior to adjusting for the overconstraint<br>
&lt;TabAtkins> oriol: i guess that works, yeah<br>
&lt;TabAtkins> RESOLVED: Overconstrained insets return their used value prior to adjusting for the overconstraint<br>
</details>


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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 25 June 2025 16:08:59 UTC