Re: [csswg-drafts] [css-background-4] add background-layers property to set everything but background-color (#8726)

> > It's changing the mental model of how background works by introducing the idea that background has a primary base which is a colour and then everything else on top
> 
> @gavinmcfarland But that's precisely how the current model works, see https://drafts.csswg.org/css-backgrounds-3/#background-color
> 
> > This property sets the background color of an element. The color is drawn behind any background images.
> 
> Your example with `background: red, url("image.png") no-repeat right top;` is precisely invalid syntax because `red` is not in the last layer.

You're right, how silly of me. It's been a while since I worked with colours and images together and I don't think I realised that the colour had to be at the end.

Ok, now I understand what the problem is. Eek, I'm not sure if there a great alternative. I now realise what Lea was trying to describe.

What is currently background-image should have really bean background-image-source, but obviously want can't change how background-image works because that would break in every browser. Ultimately we're trying to find a word to describe a group of images, which is simple "images". And because most properties in CSS aren't plural that sort of feels weird to have background-images. background-layer feels completely alien to me, it has little to do with images (regardless or any similarities it might have with how browser engines work).

My best suggestions are:

background-image-list
background-image-layer <- even this one makes me shudder a bit

-- 
GitHub Notification of comment by gavinmcfarland
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8726#issuecomment-1565782922 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Sunday, 28 May 2023 01:28:10 UTC