Nice "nugget". I think you can optimize the code a bit by using Multiple backgrounds. Use the top (first) background as a linear-gradient using RGBa or HSLa, then using the bottom (second) background as the image. It should work the same as using a pseudo-element but with less code.
Nice "nugget". I think you can optimize the code a bit by using Multiple backgrounds. Use the top (first) background as a linear-gradient using RGBa or HSLa, then using the bottom (second) background as the image. It should work the same as using a pseudo-element but with less code.
Example below:
I made a codepen example with a one color overlay, and a multi-color overlay, both using linear-gradients.
That’s awesome. Thanks for the example, I will take note of it.