- From: Bramus via GitHub <sysbot+gh@w3.org>
- Date: Wed, 11 Sep 2024 18:20:17 +0000
- To: public-css-archive@w3.org
_(replying here to @nt1m’s reply left in https://github.com/w3c/csswg-drafts/issues/8320#issuecomment-2344240284, as it relates more to this issue)_ > Fwiw, it was mentioned multiple times in this thread, but I do not think we should be introducing `ident()`, `attr()` takes a type argument already that can be set to `ident` in `css-values-4`. So `attr(data-vt-id ident)` should theoretically work. The `ident()` function goes beyond that as it allows you to glue pieces of string together, e.g. `ident("view-" attr(data-vt-id))` or `ident("view-" attr(data-type) "-" attr(data-sequence))`. In case a `<dashed-ident>` is expected as the value, you’d do `ident("--" attr(data-whatever))`. Tacking onto what @tabatkins [mentioned in the call](https://github.com/w3c/csswg-drafts/issues/8320#issuecomment-2344208387) about comma separated values: `ident()` could be crafted in such as way that you can pass in multiple options. The first option that returns something would determine the used value. Something like `ident(attr(id), attr(data-id), unique-id)` where it would first try to grab the `[id]` attribute, then the `[data-id]` attribute, and to finally fall back to an internally generated `unique-id`. -- GitHub Notification of comment by bramus Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9141#issuecomment-2344375005 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 11 September 2024 18:20:18 UTC