Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-backgrounds-4] Decide on name for shorthand covering everything background-* except background-color #9083

Open
SebastianZ opened this issue Jul 18, 2023 · 6 comments

Comments

@SebastianZ
Copy link
Contributor

SebastianZ commented Jul 18, 2023

In #8726 we resolved to add a shorthand for background-* minus background-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):
#9083 (comment)
#9083 (comment)

Sebastian

@fantasai
Copy link
Collaborator

fantasai commented Aug 3, 2023

Copying from #8726 (comment)

What about background-overlay? That addresses both of the concerns I raised:

  • It more clearly refers to the part of the background overlaying the color. (The background color is itself, functionally, a layer of the background so background-layer is confusing in this respect.)
  • It can be interpreted in a collective sense, so it doesn't feel odd that it's not plural.

Copying from #8726 (comment)

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.)

@SebastianZ
Copy link
Contributor Author

SebastianZ commented Jan 1, 2024

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

@SebastianZ
Copy link
Contributor Author

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.)

  • 👎🏻 Abstain (0):
  • 👍🏻 background-layer (3): @SebastianZ, @LeaVerou, @Crissov
  • 😄 background-overlay (1): @fantasai
  • 🎉 background-stack (0):
  • ❤️ background-list (0):
  • 🚀 background-canvas (0):
  • 👀 background-pattern (0):

@SebastianZ
Copy link
Contributor Author

SebastianZ commented Jan 1, 2024

  • 👍🏻 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!

@Loirooriol
Copy link
Contributor

I will object to adding background-image-whatever as a shorthand of background-image.

@jonjohnjohnson
Copy link

background-texture?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants