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. 🤷
Published at
2024-12-18 09:15:57Event JSON
{
"id": "f54e1ae86ff9c30781d3ee2c55afd47a586e72693ee9d96c34fdba5a58df8e0c",
"pubkey": "4cda6ff52df8999c4707203f4940369d3e8c96261b797c01ccb21dbc8514f93a",
"created_at": 1734513357,
"kind": 1,
"tags": [
[
"t",
"css"
],
[
"proxy",
"https://mastodon.social/users/Richr/statuses/113673067388504419",
"activitypub"
]
],
"content": "With anchor positioning in #CSS, why do we use a CSS property `anchor-name` to define the anchor, and not just an `id`?\n\nI'm pretty much always going to have to write `style=\"anchor-name: --myanchor\"` surely?\n\nSurely 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?\n\nWhat have I missed? Perhaps the opportunity to style anchors? But you may as well use a class for that. 🤷",
"sig": "2d242b10071062d757a1b268296350ad80d457dcde968608a194ff35be895a27a4b8bad4d08e3298e8ed9b5a4f3e8bb8a0f02dcbc5e6d290e75a97320446b502"
}