Re: [csswg-drafts] [css-selectors-4] Selector for element with another element as ancestor (#9130)

Actually, the HTML parser can place both `p` and `div` inside an `a`, but this doesn't happen if the end tag is missing like in the example. I think this is handled in https://html.spec.whatwg.org/multipage/parsing.html#adoption-agency-algorithm. So this works:

```html
<!DOCTYPE html>
<style>a p { border: solid green }</style>
<div>
  <a href="http://example.org/">
    <p>I match</p>
  </a>
</div>
```

-- 
GitHub Notification of comment by Loirooriol
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9130#issuecomment-1661160166 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 1 August 2023 22:03:38 UTC