Re: [csswg-drafts] [css-scoping] Please bring back scoped styles (#3547)

@keithjgrant That is a good question. Using the @scope rule would address some of the backwards compatibility and allow us more time to discuss the html attribute syntax.

```css
body {
    background-color: red;
  }

@scope html {
  body {
    background-color: blue;
  }
}
```

The rule as written would give us a blue body background if the ```@scope``` rule is followed, but be coloured red if the rule isn't understood. Whereas, the scoped html attribute would simply act like an inline css declaration and make the body red anyways in all cases.

I think the ```@scope``` rule is more consistent with how the rest of the declarations work for backwards compatibility.

ie. If it is understood, use it. If it's not understood, just ignore it. Vendors have been touting progressive enhancement as the path of least resistence and for that to work, the language needs to be as consistent as possible. the scoped html attribute breaks that consistency in my opinion.

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

Received on Wednesday, 30 January 2019 19:11:11 UTC