Open SebastianZ opened 1 year ago
Copying from https://github.com/w3c/csswg-drafts/issues/8726#issuecomment-1561573652
What about background-overlay
? That addresses both of the concerns I raised:
background-layer
is confusing in this respect.)Copying from https://github.com/w3c/csswg-drafts/issues/8726#issuecomment-1569293639
I think it's worth noting that we have a similar pattern of properties for fill
, and might want to use the same name there: https://drafts.fxtf.org/fill-stroke-3/ (So we should pick a name that works for both.)
I still slightly prefer the initially suggested background-layer
over the others. Though I am ok with background-overlay
.
I am ruling out some for myself here, which I think don't fit well.
background-pattern
While "pattern" indicates that the solid color is excluded, it somewhat sounds like it allows creating simple patterns and not to the images.background-screen
"screen" refers to the monitor in virtually all contexts, not to a layer.background-cover
"cover" rather has a meaning of a single thing, like a book cover, not of multiple layers.background-slice
We already have border-image-slice
which refers to slicing an image. So "slice" here may rather confuse authors.background-image-stack
This conveys the idea of different image layers, though it looks like a longhand of background-image
while it actually is a shorthand for it and the other background-*
properties.background-media
"media" sounds like it covers images, videos and other types of media.background-image-list
Same reason as with background-image-stack
.background-image-layer
Same reason as with background-image-stack
.Sebastian
To make progress on this, let's get some straw poll for the different suggestions. As there are many, I'll split them up into several comments. Please add your name besides the entry your prefer or add your vote to the comment. (I've added the names of members who expressed their opinion on one of the proposals in #8726.)
background-layer
(3): @SebastianZ, @LeaVerou, @Crissovbackground-overlay
(1): @fantasaibackground-stack
(0): background-list
(0): background-canvas
(0): background-pattern
(0): background-sheet
(0):background-screen
(0):background-cover
(0):background-image-stack
(0):background-image-list
(0):background-image-layer
(0):Note that I explicitly left out background-slice
and background-media
, because I think they miss the idea behind that property. If somebody thinks differently, please leave a comment!
I will object to adding background-image-whatever
as a shorthand of background-image
.
background-texture
?
We went with color-layers()
in https://github.com/w3c/csswg-drafts/issues/8431#issuecomment-2274558595 so I think we should definitely not go with the singular background-layer
here. :)
(I think background-layers
doesn't convey as well as background-overlay
that it doesn't include the background-color layer, so I'm not totally convinced. But at least it doesn't have the singularity weirdness of background-layer
.)
We went with
color-layers()
in #8431 (comment) so I think we should definitely not go with the singularbackground-layer
here. :)
I want to point out that all list-valued properties so far have singular names, e.g. transition
, animation
, box-shadow
, and so do all background-*
properties. So, even when it's clearer using the plural version here, it breaks consistency. That said, I don't have a strong opinion on this.
What I do have a strong opinion about is the lack of votings so far. It would be great if we got some more opinions on this, so we can resolve on a name.
Sebastian
I'm also voting for background-layer
. To me it seems the most self-explanatory.
In #8726 we resolved to add a shorthand for
background-*
minusbackground-color
.We didn't decide on its name yet, though. I already listed the current suggestions in the other issue, but here they are again:
background-layer
background-overlay
background-stack
background-list
background-canvas
background-pattern
background-sheet
background-screen
background-cover
background-slice
background-image-stack
background-media
background-image-list
background-image-layer
Straw poll (split into two comments due to the amount of suggestions): https://github.com/w3c/csswg-drafts/issues/9083#issuecomment-1873525790 https://github.com/w3c/csswg-drafts/issues/9083#issuecomment-1873526932
Sebastian