What is Nostr?
Richard Rutter /
npub1fnd…wp8y
2024-12-18 09:15:57

Richard Rutter on Nostr: With anchor positioning in #CSS, why do we use a CSS property `anchor-name` to define ...

With anchor positioning in #CSS, why do we use a CSS property `anchor-name` to define the anchor, and not just an `id`?

I'm pretty much always going to have to write `style="anchor-name: --myanchor"` surely?

Surely an anchor has to be a unique element, so it could be targeted in the same way as you would for an HTML input label?

What have I missed? Perhaps the opportunity to style anchors? But you may as well use a class for that. 🤷
Author Public Key
npub1fndxlafdlzvec3c8yql5jspkn5lge93xrduhcqwvkgwmepg5lyaqeewp8y