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

@andruud 

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

I found this _incredibly_ confusing to understand. At first it looked like these were local variables to compute the initial value. My next guess was that they were longhands, and the property being defined was a shorthand. It took a _while_ to realize what it was doing.
Compare to something like this, which is pretty self-explanatory:

```css
@property --width, --height, --depth {
 syntax: "";
 inherits: false;
 initial-value: 2147483647px;
}

@property --depth {
 initial-value: 0px;
}
```

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


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

Received on Thursday, 4 December 2025 01:29:00 UTC