-
Notifications
You must be signed in to change notification settings - Fork 759
Closed
Labels
Closed Accepted as Obvious BugfixCommenter SatisfiedCommenter has indicated satisfaction with the resolution / edits.Commenter has indicated satisfaction with the resolution / edits.css-values-4Current WorkCurrent Work
Description
https://andreubotella.com/csswg-auto-build/css-values-4/#numeric-ranges
<length [0,100px]>indicates a length between0pxand100px(expressed in any unit).
The problem is that, while all lengths have compatible units that can be converted into the canonical px, this may not be possible at parse time. For example,
Name: foo
Value: <length [0,100px]>
Initial: ''0px''
div {
foo: 1em;
font-size: 50px;
}Then foo: 1em becomes 50px which is within the range. But
div {
foo: 1em;
font-size: 200px;
}then foo: 1em becomes 200px, outside the range.
So how is foo: 1em validated? Is it always allowed and then clamped at computed-value time?
It may just be simpler to say that range restrictions with dimensions require one side to be 0 (optionally with a unit) and the other side to be ∞ or -∞.
Metadata
Metadata
Assignees
Labels
Closed Accepted as Obvious BugfixCommenter SatisfiedCommenter has indicated satisfaction with the resolution / edits.Commenter has indicated satisfaction with the resolution / edits.css-values-4Current WorkCurrent Work