Bug 191696

Summary: Getting the inferred background-repeat-[xy] values returns the shorthand background-repeat value
Product: WebKit Reporter: Ben Dean <bendean837>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WONTFIX    
Severity: Normal CC: bfulgham, simon.fraser
Priority: P2    
Version: Safari 12   
Hardware: Mac   
OS: macOS 10.13   
Attachments:
Description Flags
Illustration / reproduction none

Ben Dean
Reported 2018-11-15 09:14:43 PST
Created attachment 354945 [details] Illustration / reproduction I can reproduce this bug on Chrome as well as Safari -- though not Firefox, which doesn't seem to support background-repeat-x or background-repeat-y. Code to reproduce: > var div = document.createElement("div"); > div.style = "background-repeat: no-repeat, repeat"; > console.log(div.style.backgroundRepeatX); > console.log(div.style.backgroundRepeatY); Expected > "no-repeat" > "repeat" Actual: > "no-repeat, repeat" > "no-repeat, repeat" Also see the attached html file. Thanks!
Attachments
Illustration / reproduction (1.04 KB, text/html)
2018-11-15 09:14 PST, Ben Dean
no flags
Ben Dean
Comment 1 2018-11-15 09:22:36 PST
This bug is tracked for Chrome at http://crbug.com/905707
Brent Fulgham
Comment 2 2022-07-01 16:28:01 PDT
Chrome closed their bug in 2020 as Behaves Correctly: """ it is wrong usage to add "," between two values. according to spec, <repeat-style> = repeat-x | repeat-y | [repeat | space | round | no-repeat]{1,2} https://drafts.csswg.org/css-backgrounds-3/#background-repeat. so i think it should be like below div.style = "background-repeat: no-repeat repeat"; // without comma """ So we will take the same approach.
Note You need to log in before you can comment on or make changes to this bug.