Post

🤩 I’m very (VERY!) excited about CSS `ident()` – a feature I proposed and specced – getting prototyped. This allows me to reduce the amount of CSS I have to write when multiple items that behave in the same need to have a unique name. See brm.us/ident for an intro.

brm.usThe Future of CSS: Construct <custom-ident> and <dashed-ident> values with ident()Uniquely name a bunch elements in CSS in one go! Instead of assigning 100 unique names through 100 declarations, write only 1 and use ident() to construct the names.

15 reposts70 likes

Yep. Works for any property that accepts an `<ident>`: view-transition-name, container-name, anchor-name, view-timeline-name, scroll-timeline-name, …

One of the things we do to identify developer is pay very close attention to the results of surveys like the State of CSS. So whenever these are shared, please fill them in.

Or we hear from devs directly at conferences, through blog posts y’all write, etc. E.g. at last year’s @cssday.bsky.social there was an overwhelming request for `sibling-count()` and `sibling-index()` after we asked around … and those are now about to ship (in Chrome 138 :))