Post #2814077
2026-02-17 14:14 UTC
@sturobson@front-end.social I can’t think of a layout structure where all headings would be next to each other to allow `sibling-index()` to work in this way. It would be cool if we had something like `heading-level()`.
Replies (1)
-
@sturobson@front-end.social 2026-02-17 14:19
@burkybang@mastodon.social agreed, something like heading-level() would be cool. As for using the idea, but not necessarily the terse one liner - we can have a :heading(Nn) { } which defines the heading level for the scale. I like the idea of different scales for different viewports - and I guess we can make different sizes depending on where the heading is … perhaps a card H3 looks like an H2? Also think this is where Mike's CSS Custom Property strategy comes in handy. Thanks for taking a look <3