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 getPropertyValue(), for shorthand properties, it says to simply append the value of the CSS declaration of each longhand. However, this might result in something that doesn't conform to the grammar of the shorthand property. For example, the overflow shorthand only accepts 1 keyword, but getPropertyValue() would return a list containing the value for overflow-x and overflow-y. What should be the correct behaviour of getPropertyValue() in these cases?
The text was updated successfully, but these errors were encountered:
Return the result of joining values as appropriate according to the grammar of shorthand and terminate these steps.
That's certainly hand-waving and there may be bugs in the spec's algorithm... but the intent is to serialize something that follows the grammar for the shorthand.
According to the CSSOM spec [1], when overflow-x and overflow-y
are different, the computed value of overflow should be the empty
string since it cannot be expressed in the grammar (step 1.2.).
However, we currently return the max of overflow-x and overflow-y
in terms of their enum values, which does not follow the spec.
Firefox handles this issue correctly.
This patch fixes this issue by return an empty string if the two
overflows are different.
[1] https://drafts.csswg.org/cssom/#serialize-a-css-value
[2] w3c/csswg-drafts#1100
BUG=701235
Review-Url: https://codereview.chromium.org/2752623002
Cr-Commit-Position: refs/heads/master@{#461352}
In getPropertyValue(), for shorthand properties, it says to simply append the value of the CSS declaration of each longhand. However, this might result in something that doesn't conform to the grammar of the shorthand property. For example, the overflow shorthand only accepts 1 keyword, but
getPropertyValue()
would return a list containing the value foroverflow-x
andoverflow-y
. What should be the correct behaviour of getPropertyValue() in these cases?The text was updated successfully, but these errors were encountered: