Re: [csswg-drafts] [css-scoping] Handling global name-defining constructs in shadow trees

If you use `animation-name: inherit` across shadow boundaries it copies the `m_styleScopeOrdinal` member, even though it means a different thing. Simplest test-case would be something like:

```html
<!doctype html>
<style>
#host {
  animation: myanim 10s infinite;
}
</style>
<div id="host"></div>
<script>
  host.attachShadow({ mode: "open" }).innerHTML = `
    <style>
      @keyframes myanim {
        from { background: red; }
        to { background: red; }
      }
      #inner {
        width: 100px;
        height: 100px;
        background: green;
        animation: inherit;
      }
    </style>
    <div id="inner"></div>
  `;
</script>
```

Which shows red. In this case it doesn't seem like a big deal because we're using just the shadow tree rules, but I think I can come up with more confusing test-cases involving nested slots. 

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

Received on Wednesday, 2 May 2018 01:56:02 UTC