Skip to content

Conversation

@Calme1709
Copy link
Contributor

See individual commits for details

The spec states that "In random(A, B, C)... If C is infinite, the result
is A." however this test previously expected the result to be NaN, the
same as if B was infinite.
We expect the fixed value to be less than (not equal to) 1.

assert_{greater_than_equal|less_than} expects the actual value to
be given as a number rather than a string
Copy link
Contributor

@tabatkins tabatkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a suggestion for moving the removed invalid test into a valid test, but otherwise r+.

[the spec](https://drafts.csswg.org/css-values-4/#calc-range) states
that "Parse-time range-checking of values is not performed within math
functions, and therefore out-of-range values do not cause the
declaration to become invalid".

This means we should allow math functions that result in out of range
results in <random-value-sharing> fixed values at parse time with the
expectation that they will be clamped at compute time
Corresponds to w3c/csswg-drafts@f587be0 which updated the criteria for
random arguments to be of consistent rather than same type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants