You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In most (I believe all other) cases, when parsing a calc() expression there is a known "context" which is needed to determine the type of percentage values. This is needed to figure out if the type should be a dimension with a percent hint (like when parsing a width property), or raw percentage (like when parsing scale).
With CSSNumericValue.parse(...) however, there is no specified context.
How are percentages supposed to be interpreted when parsed in this way?
The text was updated successfully, but these errors were encountered:
Correct, there isn't a specified context, so the paragraphs conditioned on the context don't apply.
As far as I know, the behavior should work out either way - if you have a value that works due to having a known context, then parsing it without a known context then matching it against a grammar should always work as well. Getting that right has been difficult and subtle; if you find an instance where it fails, it's a spec bug.
In most (I believe all other) cases, when parsing a
calc()
expression there is a known "context" which is needed to determine the type of percentage values. This is needed to figure out if the type should be a dimension with a percent hint (like when parsing awidth
property), or raw percentage (like when parsingscale
).With
CSSNumericValue.parse(...)
however, there is no specified context.How are percentages supposed to be interpreted when parsed in this way?
The text was updated successfully, but these errors were encountered: