As found in http://wpt.live/css/css-nesting/host-nesting-003.html and http://wpt.live/css/css-nesting/host-nesting-004.html, but doesn't actually require any nesting to occur.
Example:
<!doctype html>
<div id="host"></div>
There should be no magenta box.
<script>
host.attachShadow({mode: "open"}).innerHTML = `
<style>
#host {
background-color: magenta;
width: 100px;
height: 100px;
}
</style>
`;
</script>
This displays a magenta box on Ladybird, and not on major browsers. It should only be possible for a selector in a shadow tree to match its host using the :host
/:host()
pseudo-classes, and not directly. (eg, :host(#host)
should work, and #host
should not.)
This bug only lets us see the shadow host, and not any other external elements.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too