You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We often run into situations where background-color has already been set for an element or component, and in a separate class we want to also add a background image to it.
In order to do this without overriding the color, we have to use the background-image property specifically.
Then we need to size, position, no-repeat it and that's 3 more longhand properties.
Add two bg images and we're managing parallel arrays in every longhand property above to avoid overriding the background-color set elsewhere.
Fortunately, the spec already defines a <bg-layer> so it may not be a big ask to add background-layers as a shorthand property that defines everything for a background, excluding background-color.
background-layers = <bg-layer># | none
(suggesting plural background-layers even though the longhand bg properties are singular since they predate multiple image layers)
Thank you!
LeaVerou, jimmyfrasche, LemmaEOF, alebelcor and manuelmeister