ladybird/Tests/LibWeb/Layout/input/misc/invalid-slotted-selector.html
Aliaksandr Kalenik 308c2eab0e LibWeb: Throw parsing error if ::slotted() argument is not 1 compound
...selector. Grammar per spec: `::slotted( <compound-selector> )`, so
we should reject selector as invalid if first compound selector is
followed by something else.

This change makes layout more correct on https://www.rottentomatoes.com/
2025-09-04 13:55:20 +01:00

11 lines
No EOL
478 B
HTML

<!DOCTYPE html><div><template shadowrootmode="open"><style>
slot[name='nav-links']::slotted(ul) {
display: flex;
flex-direction: row;
list-style: none;
background-color: red;
}
slot[name='nav-links']::slotted(ul > li) { /* This selector is invalid, because ::slotted argument is limited to 1 compound selector */
display: inline-block;
}
</style><slot name="nav-links"></slot></template><ul slot="nav-links"><li><a>HELLO</a></li><li><a>HI</a></li></ul></div>