Audio tag without controls should not be `display:block`
Closed this issue · 1 comments
mirisuzanne commented
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 hide audio: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. 😛
jaandrle commented
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).