Re: [csswg-drafts] [css-env] Adding custom env() variables (#2627)

My concern with this proposal is that the syntax of constants clashes with that of custom properties. I think they should be obviously distinguishable from each other, as [examples like these could be really confusing](https://github.com/w3c/csswg-drafts/issues/2627#issuecomment-624678754).

```
@media screen and (min-width: var(--breakpoint-s, 300px)) {   /* because constants are selector agnostic */
    body {
        --body-bg: red; /* no effect, because --body-bg is already a constant (then it's unalterable) */
        background-color: var(--body-bg, green); /* blue, because --body-bg is simply already defined */
    }
}
```

Here, an author would have to go through the entire stylesheet and imports to see why `--body-bg` isn’t red. If constants had a different syntax, it would be clear by just looking at it.

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


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

Received on Tuesday, 28 February 2023 11:52:54 UTC