Description
Issue
The <picture>
element is doing nothing, only providing context for the browser. So the expected behaviour should be that it's being treated as an img element. This is the case using the Descendant Selector. But as soon as a selector other than the Descendant Selector is introduced this is no longer the case and CSS won't select the picture anymore.
Examples
1. Descendant Selector
A <picture>
with a <div>
as parent and a Descendant Selector:
https://codepen.io/melvinidema/pen/WWpBjp
2. Selector other than Descendant
A <picture>
with a <div>
as parent and a selector other Descendant Selector:
https://codepen.io/melvinidema/pen/zXZdKw
Expected Behaviour
The expected behaviour would be to have CSS treating the <picture>
as a whole as if it was an <img>
. As the <picture>
and the <source>
are only providing context. This is already the case using the Descendant Selector [space] as seen in the first example.