Update: As of June 2021, Firefox 89 is the first browser to support the type()
function within image-set()
, enabling us to do this with purely CSS.
Update 2: As of June 2023, Chrome 113, and Safari 17 also support the type()
function within image-set()
, making this usable in all major