Closed mirisuzanne closed 3 years ago
What about this naive approach?
audio{ … }
/* just recover default browser behaviour */audio:not[controls]{display:none;}
Of course, the specificity problem is still there, but at least is concentrated in "specific situation" which we rarely need to change (I guess).
I think it's generally good to include
audio
in the list of Embedded Elements that we display as block, with responsive sizing and vertical alignment. But browsers hideaudio:not([controls])
by default, and I think it's a mistake for us to override that setting.I'm not sure about the right solution. If we change that selector to
audio[controls]
or even just[controls]
we're adding more specificity than we use elsewhere.We need CSS Layers so that we can not worry about specificity in cases like this. 😛