| Summary: | "background-size: 12px" works differently than in other browsers | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Michael Leu <subsevenx2001+webkit> | ||||||
| Component: | CSS | Assignee: | Nobody <webkit-unassigned> | ||||||
| Status: | RESOLVED CONFIGURATION CHANGED | ||||||||
| Severity: | Normal | CC: | ahmad.saleem792, karlcow, simon.fraser, webkit-bug-importer, zalan | ||||||
| Priority: | P2 | Keywords: | BrowserCompat, InRadar | ||||||
| Version: | Safari 14 | ||||||||
| Hardware: | Mac (Intel) | ||||||||
| OS: | macOS 11 | ||||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=170834 | ||||||||
| Attachments: |
|
||||||||
|
Description
Michael Leu
2022-08-10 02:11:30 PDT
It is intentional that -webkit-background-size and background-size behave differently in Safari in this case. -webkit-background-size differs from background-size only in the interpretation of a single value: '-webkit-background-size: l;' is equivalent to 'background-size: l l;' whereas 'background-size: l;' is equivalent to 'background-size: l auto;'. But maybe the last aspect doesn't match other browsers and/or the spec? See also bug 170834. The workaround is specify both values, "background-size: 12px 12px". Created attachment 461650 [details] simplified test case first of all. The CSS code is not correct. "display: absolute" does NOT exist. If it was meant to be position: absolute, then we see the dots at the bottom of the viewport. That said I'm not sure the positions are required. So let's remove them to simplify the test. As for background-size and as Alexei mentioned: https://developer.mozilla.org/en-US/docs/Web/CSS/background-size https://drafts.csswg.org/css-backgrounds/#the-background-size > The first value gives the width of the corresponding image, the second value its height. If only one value is given the second is assumed to be auto. Now if I specify "background-size: 12px auto" the 3 rendering engines still displays the test case differently. there's an issue about the behavior differences in browsers in the compat spec. https://github.com/whatwg/compat/issues/28 And yes this is basically a duplicate of bug 170834 This seems to work while using attached test cases in STP164 and WebKit ToT (261422@main) and matching Chrome Canary 113 and Firefox Nightly 112. Can we mark this as "RESOLVED CONFIGURATION CHANGED"? Thanks! |