- From: Brad Kemper via GitHub <sysbot+gh@w3.org>
- Date: Wed, 23 Dec 2020 05:51:08 +0000
- To: public-css-archive@w3.org
> Syntactically speaking, the suggested idea means tha
> 1. property declarations may appear directly within a media query, but only if they are nested within a style rule.
> 
> 2. within a media query, property declarations must come before any rule declarations.
#1 is true, and intended, but I don't think #2 would follow. The closing brace of a media query or a rule within a rule tells the parser that it can start looking for property declarations (or ampersands or @ signs) again.
So, this is also not ambiguous as to whether to parse as property or rule:
```
.btn {
  margin: 5px;
  @media (max-width: 768px) {
      display: block; 
      &:hover { 
          box-shadow: 0 0 2px black inset;
      }
      margin: 5px 0;
  }
  border: 1px solid;
}
```
-- 
GitHub Notification of comment by bradkemper
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5805#issuecomment-749950179 using your GitHub account
-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 23 December 2020 05:51:09 UTC