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.
Chief Mentor @ learnwithparam.com | Helping software engineers become AI powerhouses through hands-on workshops & bootcamps π | Mentoring & consulting teams to turn ideas into AI products β impact π
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.