Marshal27 / shadow-container-query-polyfill

A polyfill for CSS Container Queries
https://npm.im/shadow-container-query-polyfill
Apache License 2.0
8 stars 1 forks source link

Fix remaining wpt/css/css-contain/container-queries/container-for-shadow-dom.html test #8

Open Marshal27 opened 1 year ago

Marshal27 commented 1 year ago

t4: "Match container in outer tree for :host" t7: "Match container in outer tree for :host::before" t10: "Match container for slot light tree child fallback"

Marshal27 commented 1 year ago

The failure on t10 is a result of the target div being a child of the slot.

The slot element having display: contents results in a computed display flag of 1 and thus the conditions are zero'd out and not passed down to the child/children.

The following will not work:

 <slot>
     <span id="t10"></span>
 </slot>

The following will work:

 <slot>
 </slot>
 <span id="t10"></span>