Open Bug 1273244 Opened 9 years ago Updated 2 years ago

Add support for {background|mask}-repeat-{x|y}

Categories

(Core :: CSS Parsing and Computation, defect, P3)

defect

Tracking

()

Tracking Status
firefox49 --- affected

People

(Reporter: mstange, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-needed, DevAdvocacy, Whiteboard: [DevRel:P3])

Attachments

(6 files)

Edge and Chrome appear to support the CSS properties background-repeat-x and background-repeat-y. We should consider adding support for these properties. They are not part of css-background-4. I filed a bug about that: https://github.com/w3c/csswg-drafts/issues/116
Component: Layout → CSS Parsing and Computation
Keywords: dev-doc-needed
Priority: -- → P3
Assignee: nobody → kuoe0
As a counterpart, would we have the same support for mask-repeat-{x,y} longhands ? Probably need to create another bug for track the implementation. [1] mask-repeat-x : https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-mask-repeat-x
Flags: needinfo?(mstange)
If we're going to do both, it should probably just be one bug. (But it's only worth doing both if they're both in WebKit and Chromium (and, if Edge has mask support, Edge).)
I agree. Implementing repeat-x and repeat-y only for background and not for mask would be harder than implementing them for both.
Flags: needinfo?(mstange)
(In reply to Markus Stange [:mstange] from comment #3) > I agree. Implementing repeat-x and repeat-y only for background and not for > mask would be harder than implementing them for both. So I guess you should also file a spec. issue for this at https://github.com/w3c/fxtf-drafts/issues. Sebastian
Current status on other browser engines: **background-repeat-{x,y}** Google Chrome: Shipped Safari: Only property name can be recognized Edge: No support **mask-repeat-{x,y}** Google Chrome: Only property name can be recognized (w/ webkit prefix) Safari: Only property name can be recognized (w/ webkit prefix) Edge: No support
Summary: Add support for background-repeat-x/y → Add support for {background|mask}-repeat-x/y
Blocks: mask-image
No longer blocks: 124422
Status: NEW → ASSIGNED
(In reply to Tommy Kuo [:KuoE0] from comment #5) > **background-repeat-{x,y}** > > Google Chrome: Shipped > Safari: Only property name can be recognized > Edge: No support > > **mask-repeat-{x,y}** > > Google Chrome: Only property name can be recognized (w/ webkit prefix) > Safari: Only property name can be recognized (w/ webkit prefix) > Edge: No support What does "Only property name can be recognized" mean, and how does it differ from "Shipped"?
Summary: Add support for {background|mask}-repeat-x/y → Add support for background-repeat-{x|y}
I think we should only implement the `background-repeat-{x|y}`. Currently, no browser engine supports `mask-repeat-{x|y}`. But for `background-repeat-{x|y}`, Google Chrome already supports it. For web compatibility, I think we should implement these properties. The current status on other browser engines is following: **Microsoft Edge** No support. **Google Chrome** It supports keywords `repeat` and `no-repeat`. The behavior of `background-repeat-x: no-repeat` is repeat the background only on y-axis, like `background-repeat: no-repeat repeat`. The behavior of `background-repeat-y: no-repeat` is repeat the background only on x-axis, like `background-repeat: repeat no-repeat`. The behavior of `background-repeat-x: no-repeat; background-repeat-y: no-repeat;` **should not repeat on any axis**, like `background-repeat: no-repeat no-repeat`. **Apple Safari** No support. And there is a site[1] using `background-repeat-x` and `background-repeat-y`. We can notice that some images should be no-repeat. And it works on Google Chrome not on Mozilla Firefox. There are the screenshots of Google Chrome and Mozilla Firefox in attachments. More discussions about `background-repeat-{x|y}` are in [2] and [3]. [1]: http://ocando.vnz.la/ [2]: https://github.com/w3c/csswg-drafts/issues/116#issuecomment-221668012 [3]: http://lists.w3.org/Archives/Public/www-style/2014Apr/0188.html
Attached image Google Chrome.png (deleted) —
Attached image Mozilla Firefox.png (deleted) —
No longer blocks: mask-image
After trying to implement `background-repeat-{x|y}`, I found it's hard to implement only `background-repeat-{x|y}` without `mask-repeat-{x|y}`. Because background and mask share the most implementation (see Bug 686281). If we make `background-repeat` be a shorthand property but `mask-repeat` still is a longhand property, it would make the complexity of implementation higher. In the latest spec of `mask-repeat`[1], it's linked to the spec of `background-repeat`. As I mentioned before, `background-repeat-{x|y}` will be added to **background-4**[2]. As the counterpart of background, I think it also makes sense to add `mask-repeat-{x|y}` to the spec of mask. I also filed a spec issue[3] on fxtf-drafts. I also referred the implementation of Chromium. In Chromium, `background-repeat` and `-webkit-mask-repeat` also share the same implementation[4]. When Chromium shipped `background-repeat-{x|y}`, `-webkit-mask-repeat` also became a shorthand property. Furthermore, the longhand properties `-webkit-mask-repeat-x` and `-webkit-mask-repeat-y` also existed. Even we cannot set any value to these two longhand properties, I think the implementation is not completed. And I filed a related issue[5] to track that. So, I intent to implement `background-repeat-{x|y}` and `mask-repeat-{x|y}` together. [1]: https://www.w3.org/TR/css-masking/#propdef-mask-repeat [2]: https://github.com/w3c/csswg-drafts/issues/116#issuecomment-221668012 [3]: https://github.com/w3c/fxtf-drafts/issues/99 [4]: https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp?rcl=0&l=5333-5334 [5]: https://bugs.chromium.org/p/chromium/issues/detail?id=674051
Hi dbaron, what do you think on comment 10? Or, maybe we should start to implement after we get the positive response on [1] or [2]. [1]: https://github.com/w3c/fxtf-drafts/issues/99 [2]: https://bugs.chromium.org/p/chromium/issues/detail?id=674051
Flags: needinfo?(dbaron)
I agree that it's a lot easier to implement both background-repeat-x/y and mask-repeat-x/y at the same time. However, if we wanted not to expose mask-repeat-x/y, we could implement them internally but not expose them to the Web. That said, I'll try to bring this up in 3 weeks at https://wiki.csswg.org/planning/seattle-2017 . Perhaps it's worth waiting until then.
Keywords: DevAdvocacy
Whiteboard: [DevRel:P3]
Summary: Add support for background-repeat-{x|y} → Add support for {background|mask}-repeat-{x|y}
Hi dbaron, do we decide to not implement these properties? In this comment[1], I think @gregwhitworth intent to obsolete `background-repeat-{x,y}` in spec. [1]: https://github.com/w3c/csswg-drafts/issues/116#issuecomment-272232037
Flags: needinfo?(dbaron)
So we discussed this issue *twice* at the face-to-face meeting. The first discussion: https://log.csswg.org/irc.w3.org/css/2017-01-11/#e758676 didn't reach much of a conclusion. But the second discussion: https://log.csswg.org/irc.w3.org/css/2017-01-11/#e759036 did conclude to add the properties. That said, Greg's comment was after *both* discussions, so maybe we need to revisit the discussion a third time. I guess that, given that we haven't seen any compatibility problems in the wild and the issue is still under discussion, I'd be inclined to wait for now and not add them yet.
Flags: needinfo?(dbaron)
Ok, if there is any update, please let me know!
Assignee: kuoe0.tw → nobody
Status: ASSIGNED → NEW
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: