Re: [csswg-drafts] [css-properties-values-api] Shorthand for custom property declaration (#7523)

Just brainstorming:

> `@properties`

`@layer` (non-plural form) allows specifying multiple layers, so we could re-use `@property` (non-plural) to specify multiple properties.

> Initial values are either distinct per property, or at least short enough that it's fine to repeat.

Maybe we can allow `env(--my-thing)` in these values for the cases where repeats _are_ annoying (see https://github.com/w3c/csswg-drafts/issues/9206).

And/or allow the `initial-value` descriptor:

```
@property {
  syntax: "<length>";
  inherits: false;
  initial-value: 2147483647px;
  --width: initial; /* 2147483647px */
  --height: initial; /* 2147483647px */
  --depth: 0px;
}
```

Then we could say that the old form `@property --x { syntax: "<length>"; inherits: false; initial-value: 0px; }` is equivalent to `@property { syntax: "<length>"; inherits: false; initial-value: 0px; --x: initial; }`.


-- 
GitHub Notification of comment by andruud
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7523#issuecomment-1683831209 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 12:14:14 UTC