Re: [csswg-drafts] [css-values] A way to dynamically construct custom-ident and dashed-ident values (#9141)

The CSS Working Group just discussed `[css-values] A way to dynamically construct custom-ident and dashed-ident values`, and agreed to the following:

* `RESOLVED: Adopt ident() function into css-values-5`

<details><summary>The full IRC log of that discussion</summary>
&lt;noamr> bramus: this is about dynamically constructing dynamic idents/dashed-idents. for when authors need to come up for idents in multiple elements in one go<br>
&lt;bramus> https://github.com/w3c/csswg-drafts/issues/9141#issuecomment-2536648501<br>
&lt;noamr> bramus: e.g. view-timeline-name. The ident() function together with attr(), can have those created in one go<br>
&lt;noamr> bramus: see examples<br>
&lt;noamr> bramus: e.g. combining the data-* attribute with other strings<br>
&lt;noamr> bramus: another example where view-transition-name is dynamically constructed from the enclosing element<br>
&lt;noamr> bramus: proposing an ident() function with space-separated items, can be string/integer/ident<br>
&lt;noamr> bramus: can you just use attr?<br>
&lt;noamr> bramus: sometimes you need to glue pieces together, some of which are attr and some not, e.g. strings<br>
&lt;noamr> bramus: sometimes you need to refer to that name, you can't always put it as an attribute-specific value like "view-transition-name: auto"<br>
&lt;kizu> +1, wanted this in 2016<br>
&lt;noamr> astearns: a bit concerned that stitching together ident() really depends on the context in which the function is being used<br>
&lt;noamr> astearns: I can see myself being confused about why my ident() is not matching because of not thinking of the context<br>
&lt;noamr> bramus: dev tools can definitely help with that, to find the generated values<br>
&lt;miriam> q+<br>
&lt;astearns> ack miriam<br>
&lt;noamr> bramus: like see a mapping of references to names in view-timeline etc<br>
&lt;noamr> miriam: to clarify, when creating idents like this in CSS, it generally means we have to refer to them somewhere else<br>
&lt;noamr> miriam: in most of these pieces it makes sense that you've created the name, and then you need to reference them<br>
&lt;noamr> q+<br>
&lt;noamr> bramus: in view-timeline, set on non-parent elements, each photo might have its view-timeline, but the dots might not be descendants and still refer to the images by name<br>
&lt;noamr> bramus: so e.g. the sibling-index() can be used with ident() to rebuild the ident()<br>
&lt;astearns> ack noamr<br>
&lt;bramus> noamr: one issue of this is css custom props wher eyou put on an an ancestor and then refer to that var<br>
&lt;bramus> … sometimes the attr you want is somewhere above and the participing element is somwheer down below<br>
&lt;noamr> bramus: similar to how the attr() behaves, they resolve before inherited<br>
&lt;noamr> bramus: one of the examples is where the cart stores an attribute into --id custom property, and down the line an ident() function uses that value<br>
&lt;bramus> s/how the attr() behaves/how the attr() behaves when used in a custom prop<br>
&lt;noamr> astearns: PROPOSED RESOLUTION that we resolve the feature<br>
&lt;noamr> fantasai: proposal should be to adopt to the css-values-5<br>
&lt;noamr> PROPOSED RESOLUTION: work on this issue in css-values-5 draft<br>
&lt;fantasai> PROPOSED: Adopt ident() function into css-values-5<br>
&lt;noamr> astearns: objection?<br>
&lt;fantasai> RESOLVED: Adopt ident() function into css-values-5<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9141#issuecomment-2551910531 using your GitHub account


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

Received on Wednesday, 18 December 2024 17:36:11 UTC