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

order of values in background test #35740

Closed
karlcow opened this issue Sep 1, 2022 · 7 comments
Closed

order of values in background test #35740

karlcow opened this issue Sep 1, 2022 · 7 comments

Comments

@karlcow
Copy link
Contributor

karlcow commented Sep 1, 2022

Should we put the white on line 38 in the first place.

Rationale:
That would test the serialization of multiple background, and not the issue about canonical order in serialization which is being debated.

test((t) => {
element.style = `background: url(/favicon.ico) top left no-repeat,
url(/favicon.ico) center / 100% 100% no-repeat,
url(/favicon.ico) white;`;
assert_equals(element.style.background , 'url("/favicon.ico") left top no-repeat, url("/favicon.ico") center center / 100% 100% no-repeat, white url("/favicon.ico")');
}, "multiple backgrounds with varying values");

@karlcow
Copy link
Contributor Author

karlcow commented Sep 1, 2022

Ah maybe it was intentional
if I look at the pull request review
https://phabricator.services.mozilla.com/D155077

@emilio would it be better to test those two separately? aka the canonical order and the way background is supposed to work.

@emilio
Copy link
Contributor

emilio commented Sep 1, 2022

That was done in https://bugzilla.mozilla.org/show_bug.cgi?id=743392, but actually given <final-bg-layer> has the <background-color> before rather than after (https://drafts.csswg.org/css-backgrounds/#typedef-final-bg-layer) I think WebKit and Blink follow the spec and Gecko is wrong, so we should probably fix Gecko.

@emilio
Copy link
Contributor

emilio commented Sep 1, 2022

@emilio
Copy link
Contributor

emilio commented Sep 1, 2022

Actually it's the other way around, Gecko is right. Why testing it separately?

@emilio
Copy link
Contributor

emilio commented Sep 1, 2022

I think the order is clear in the spec, but if you disagree please open a spec issue stating the case?

@emilio emilio closed this as completed Sep 1, 2022
@karlcow
Copy link
Contributor Author

karlcow commented Sep 1, 2022

Actually it's the other way around, Gecko is right. Why testing it separately?

I think the order is right too.

What I was thinking is isolating tests to make sure to avoid mixing two types of constraints. :) but it's ok as-is too. Just need to improve the serialization of WebKit. Thanks for the comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants