Open dawaltconley opened 11 months ago
Possibly the way to do this with least CSS and easiest way to bundle media queries is to pass a map of variable names => images to backgroundFromSizes
and assign all these variables to :root
or a common selector (.responsive-bg
or something). Easier to add to global css?
This is the cleanest way to handle combining responsive backgrounds with other background layers like
linear-gradient
. ThebackgroundFromSizes
method would return this:Only unsure if this should be the default or if I should even support returning
background-image
. It's easy enough to make this a default forvarName
, but disallowing it would allow setting:root
as a default selector, fewer required variables.