-
Notifications
You must be signed in to change notification settings - Fork 747
Closed
Labels
css-values-4Current WorkCurrent Work
Description
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.
This is especially useful in conjunction with CSS Variables, as currently one can convert from a <number>
to a <length>
(or <angle>
etc) 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)
! Not to mention that this would be a more consistent, less surprising design.
Crissov, firefoxic, kizu, keithjgrant, js-choi and 10 more
Metadata
Metadata
Assignees
Labels
css-values-4Current WorkCurrent Work