W3C home > Mailing lists > Public > public-css-archive@w3.org > May 2021

Re: [csswg-drafts] [css-values] Specify how to handle negative percentage basis in mathematical expressions (#6298)

From: Oriol Brufau via GitHub <sysbot+gh@w3.org>
Date: Wed, 19 May 2021 18:55:47 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-844381057-1621450545-sysbot+gh@w3.org>
See https://github.com/w3c/csswg-drafts/issues/4227#issuecomment-768453578:

> you resolve as much as you can at each step but % can't be resolved at computed value time unless they are a terminal type for the property. If lengths have to wait.

So it's a bug if the implementation assumes that `0% <= 50% <= 100%` and doesn't wait until the percentages can be resolved into a length. This is already implied in the spec, https://drafts.csswg.org/css-values/#calc-simplification

> If *root* is an operator node that’s not one of the calc-operator nodes, and all of its children are numeric values with enough information to computed the operation *root* represents, return the result of running *root*’s operation using its children, expressed in the result’s canonical unit.

-- 
GitHub Notification of comment by Loirooriol
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6298#issuecomment-844381057 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 19 May 2021 18:55:52 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:33 UTC