W3C home > Mailing lists > Public > public-css-archive@w3.org > December 2017

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

From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
Date: Mon, 04 Dec 2017 20:09:31 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-349089673-1512418170-sysbot+gh@w3.org>
@dbaron That has the forward-compatibility problems noted by @fantasai in <https://github.com/w3c/csswg-drafts/issues/434#issuecomment-310183908> - if a property initially accepts only computed-value-time units, it would be clamped at computed-value time, but if it later starts accepting used-value-time units, we'd have to move it to clamping at used-value time, which is observably different.

Thus the proposal to clamp at both spots - computed value clamping if possible, used-value clamping otherwise.  That way a `width: calc(-50px)` would clamp "early", at computed-value time, but a `width: calc(10px - 10%)` would clamp "late", at used-value time.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/434#issuecomment-349089673 using your GitHub account
Received on Monday, 4 December 2017 20:09:33 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 24 March 2022 20:26:44 UTC