Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cssom] [css-overflow-3] Behaviour of getPropertyValue() unclear when the result doesn't match the property grammar #1100

darrnshn opened this Issue Mar 14, 2017 · 2 comments


None yet
2 participants
Copy link

darrnshn commented Mar 14, 2017

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?


This comment has been minimized.

Copy link

zcorpan commented Mar 15, 2017

It doesn't say to append the value of the longhand, it says to append the longhand itself. And then serialize the list of longhands using which says

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.

But also see #1033


This comment has been minimized.

Copy link

darrnshn commented Mar 16, 2017

I see, thanks!

@darrnshn darrnshn closed this Mar 16, 2017

MXEBot pushed a commit to mirror/chromium that referenced this issue Apr 3, 2017

Return '' for overflow if overflow-x and overflow-y are different.
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.

[2] w3c/csswg-drafts#1100


Cr-Commit-Position: refs/heads/master@{#461352}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.