- From: Adam Argyle via GitHub <sysbot+gh@w3.org>
- Date: Fri, 18 Aug 2023 21:41:08 +0000
- To: public-css-archive@w3.org
There's a few variable management issues getting attacked here! Love to see it 😍
<br>
from https://github.com/w3c/csswg-drafts/issues/9206#issuecomment-1683089672
> If the "environment variable name" is dashed, it just looks up the initial value of the corresponding custom property, done.
`env(--screen-sm)`, usable in places where `var()` is not, like [`@custom-media`](https://drafts.csswg.org/mediaqueries-5/#at-ruledef-custom-media), `@media`, `@container`, etc? lgtm 👍🏻
<br>
from https://github.com/w3c/csswg-drafts/issues/9206#issuecomment-1683089672
> The property should be static ... this could just be a new descriptor in the registration block. Dunno what a good name is, tho.
what about `immutable`?
syntax based on https://github.com/w3c/csswg-drafts/issues/7523#issuecomment-1683831209
```css
@property {
syntax: "<length>";
inherits: false;
immutable: true;
initial-value: 2147483647px;
--width: initial; /* 2147483647px */
--height: initial; /* 2147483647px */
--depth: 0px;
}
```
<br>
**That covers:**
1. props like consts, usable places `var()` is not. this is basically `env()` adding `--` support
1. bulk typed custom property registration, getting tackled in https://github.com/w3c/csswg-drafts/issues/7523
**Missed**?
1. a global selector to register props in that fixes the misconceptions about `:root`
1. `authors would like a solution that can handle both in one place` from https://github.com/w3c/csswg-drafts/issues/9206#issuecomment-1683125310
Seems like we still need `::document`, `@document`, `@global` global space. Local vars being global isnt solved with the `@property` bulk syntax or `env()` vars.
--
GitHub Notification of comment by argyleink
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9206#issuecomment-1684462442 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 18 August 2023 21:41:10 UTC