- From: Oriol Brufau via GitHub <sysbot+gh@w3.org>
- Date: Sat, 08 Mar 2025 02:01:04 +0000
- To: public-css-archive@w3.org
The `per-element` inversion seems confusing to me. The previous approach was more intuitive to me: - **Shared by name globally:** both properties get the same value, and every element shares the random value, so you get lots of identical squares of a single random size. ```css .random-square { width: random(--global, 100px, 200px); height: random(--global, 100px, 200px); } ``` - **Shared within an element:** both properties get the same value, but it's still different per element, so you get lots of random squares. ```css .shared-random-rect { width: random(per-element, 100px, 200px); height: random(per-element, 100px, 200px); } ``` - **Shared between elements within a property:** both properties get different values, but they're shared by every element, so you get lots of identical rectangles of a single random size. ```css .shared-random-squares { width: random(--width, 100px, 200px); height: random(--height, 100px, 200px); } ``` - **Maximum random:** both properties get a different value, and it's different per element too, so you get lots of random rectangles. ```css .random-rect { width: random(per-element --width, 100px, 200px); height: random(per-element --height, 100px, 200px); } ``` And then we can say that if the options are omitted, they they default to `per-element` followed by an ident consisting of `--`, the property name, `--`, and the index. -- GitHub Notification of comment by Loirooriol Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11742#issuecomment-2707892748 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Saturday, 8 March 2025 02:01:05 UTC