Improve seralization of 'background' shorthand
Categories
(Core :: CSS Parsing and Computation, enhancement, P5)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox105 | --- | fixed |
People
(Reporter: sebo, Assigned: connor.pearson, Mentored)
References
Details
(Keywords: good-first-bug, Whiteboard: [lang=rust], [wptsync upstream])
Attachments
(3 files)
| Reporter | ||
Updated•11 years ago
|
| Reporter | ||
Comment 1•7 years ago
|
||
Comment 2•7 years ago
|
||
Comment 3•7 years ago
|
||
Comment 4•7 years ago
|
||
Comment 6•6 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #4)
Phabricator is fine, I sync them back and forth periodically.
Hey Emilio!
If this is still an open issue, I'd like to pick this up and close this. Do let me know on this.
Comment 8•5 years ago
|
||
Sure, please ask any concrete questions you may have.
What we need to do is to:
- Check whether other browsers behave sanely when you have multiple backgrounds.
- Check for initial values like we do here for most of the longhands.
Comment 9•5 years ago
|
||
Hi Emilio,
Thanks for reply.
I have Tested this page
Firefox(default):
#test1 { background: yellow none repeat scroll 0% 0%; }
#test2 { width: 16px; height: 16px; background: rgba(0, 0, 0, 0) url("http://mozilla.org/favicon.ico") no-repeat scroll 0% 0%; }
Chrome:
#test1 { background: yellow; }
#test2 { width: 16px; height: 16px; background: url("http://mozilla.org/favicon.ico") no-repeat; }
Safari:
#test1 { background-color: yellow; background-position: initial initial; background-repeat: initial initial; }
#test2 { width: 16px; height: 16px; background-image: url("http://mozilla.org/favicon.ico"); background-position: initial initial; background-repeat: no-repeat no-repeat; }
Here is some question:
- Q1: Seems Chrome's result is OK, should we switch to that?
- Q2: Should we change both servo and Firefox code?
Comment 10•5 years ago
|
||
Q1: Seems Chrome's result is OK, should we switch to that?
That doesn't test multiple backgrounds, but yeah, Chrome has a better serialization in this case. Safari is just wrong, it shouldn't use initial.
Q2: Should we change both servo and Firefox code?
Just change Firefox (though the code is under servo/). I take care of syncing the changes to Servo from time to time (see this PR for the last one). I preserve committer attribution so it should be the same, I just do the legwork of keeping both builds because it's easier for me to do it once that for everyone that submits a patch to do the same every time :)
Comment 11•5 years ago
|
||
Comment 12•5 years ago
|
||
Firefox
#test1 { background: yellow none repeat scroll 0% 0%; }
#test2 { width: 16px; height: 16px; background: url("http://mozilla.org/favicon.ico") no-repeat scroll 0% 0%, rgba(0, 0, 0, 0) url("http://mozilla.org/favicon.ico") no-repeat scroll 0% 0%; }
Chrome
#test1 { background: yellow; }
#test2 { width: 16px; height: 16px; background: url("http://mozilla.org/favicon.ico") no-repeat, url("http://mozilla.org/favicon.ico") no-repeat; }
Seems not change much from single background,
We should just match up Chrome result right?
Comment 13•5 years ago
|
||
Hi, wangchao719.
Are you still working on this?
If not, Can I pick up this?
Comment 14•5 years ago
|
||
(In reply to shnmorimoto from comment #13)
Hi, wangchao719.
Are you still working on this?
If not, Can I pick up this?
not having progress for a while,
please feel free to go ahead
Comment 15•5 years ago
|
||
(In reply to wangchao719 from comment #14)
(In reply to shnmorimoto from comment #13)
Hi, wangchao719.
Are you still working on this?
If not, Can I pick up this?not having progress for a while,
please feel free to go ahead
Thanks for your reply.
Got it. I will proceed this.
| Assignee | ||
Comment 16•3 years ago
|
||
If nobody is actively working on this, I'd like to take a crack at it.
Comment 17•3 years ago
|
||
Please go ahead! Feel free to ask / request more information as needed.
| Assignee | ||
Comment 18•3 years ago
|
||
So far I’ve gotten the example to behave as expected, but still need to add some tests.
Could you point me in the right direction? Is this something that should go in the web platform tests?
Comment 19•3 years ago
|
||
Yeah, the tests here should be in WPT. Feel free to submit the patch and I can run it through automation to see if any existing test needs updating. Otherwise https://searchfox.org/mozilla-central/source/testing/web-platform/tests/css/css-backgrounds/parsing/ seems like a reasonable place for it.
| Assignee | ||
Comment 20•3 years ago
|
||
Updated•3 years ago
|
Comment 21•3 years ago
|
||
Comment 23•3 years ago
|
||
| bugherder | ||
Description
•