background-repeat doesn't render correctly with gradients and auto size

NEW
Unassigned

Status

()

P3
normal
2 years ago
a year ago

People

(Reporter: ethlin, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

2 years ago
Created attachment 8759493 [details]
testcase

This bug is a following bug from bug 1275957 comment 14. While the background-size is 33% auto, gecko takes it as 33% 100% and other browsers use 33% 33%.
https://drafts.csswg.org/css-backgrounds-3/#the-background-size says:
> An ‘auto’ value for one dimension is resolved by using the
> image's intrinsic ratio and the size of the other dimension,
> or failing that, using the image's intrinsic size, or failing
> that, treating it as 100%. 

So per the spec, our behavior is correct, since a gradient has neither
an intrinsic size nor an intrinsic ratio, per
https://drafts.csswg.org/css-images/#gradients
which says:
> However, the gradient itself has no intrinsic dimensions.
where "intrinsic dimensions" is a link pointing to:
> The term intrinsic dimensions refers to the set of the
> intrinsic height, intrinsic width, and intrinsic aspect
> ratio (the ratio between the width and height), each of
> which may or may not exist for a given object.
[...]
Given that both Chromium and Edge get this wrong, it's probably worth bringing up on www-style.  (Also worth testing WebKit, though.)
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.