W3C home > Mailing lists > Public > public-css-archive@w3.org > June 2018

[csswg-drafts] [css-values] Clarify that <percentage>s never resolve to <number>s in calc()

From: Sebastian Zartner via GitHub <sysbot+gh@w3.org>
Date: Fri, 15 Jun 2018 21:42:11 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-332922134-1529098930-sysbot+gh@w3.org>
SebastianZ has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-values] Clarify that <percentage>s never resolve to <number>s in calc() ==
In issue #1463 it was resolved that `<percentage>` values never resolve to `<number>` values when used in `calc()`. Though the change made to the spec. isn't as clear as @tabatkins' description in the issue.
There it was said that the problem is that `calc(1% * 1%)` would be valid for `opacity` (as percentages resolve to `<number>`s, while it is invalid in `width` (as it would resolve to length²).

Furthermore, it missed that the [definition of percentage values](https://drafts.csswg.org/css-values-3/#percentages) still allows combinations of `<number>` and `<percentage>` values in `calc()` saying

> In cases where a `<percentage>` can represent the same quantity as a dimension or number in the same component value position, and can therefore be combined with them in a `calc()` expression…

This sentence should be rephrased, so that it's clear that `<percentage>` + `<number>` combinations are invalid within `calc()`.

Sebastian

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2789 using your GitHub account
Received on Friday, 15 June 2018 21:42:13 UTC

This archive was generated by hypermail 2.3.1 : Friday, 15 June 2018 21:42:14 UTC