Bug 191696 - Getting the inferred background-repeat-[xy] values returns the shorthand background-repeat value
Summary: Getting the inferred background-repeat-[xy] values returns the shorthand back...
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari 12
Hardware: Mac macOS 10.13
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-15 09:14 PST by Ben Dean
Modified: 2022-07-01 16:28 PDT (History)
2 users (show)

See Also:


Attachments
Illustration / reproduction (1.04 KB, text/html)
2018-11-15 09:14 PST, Ben Dean
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Dean 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!
Comment 1 Ben Dean 2018-11-15 09:22:36 PST
This bug is tracked for Chrome at http://crbug.com/905707
Comment 2 Brent Fulgham 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.