LeaVerou has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-values] Allow division by <length> in calc() == The reason that division by a `<length>` was originally not allowed was that in some cases there was no way of knowing whether that was a division by 0, and before Variables there was no such concept as _invalid in computed value time_. Now that there is, perhaps we can revisit this issue for [Values 4](https://drafts.csswg.org/css-values). This is especially useful in conjunction with CSS Variables, as currently one can convert from a `<number>` to a `<length>` but there is **no way to convert a `<length>` to a `<number>`**!. Also, calculating the ratio of two lengths is often very useful, e.g. what percentage of the viewport width is `500px`? `calc(500px / 100vw)`! Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/545 using your GitHub accountReceived on Wednesday, 28 September 2016 16:18:26 UTC
This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:03 UTC