New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Heading anchor links styling #5036
Comments
WG: @petesfrench @juanruitina to provide a couple of examples of how this has been implemented in other DSs and we could look into commissioning a design for the icon. |
I've had a look at a handful of websites that have heading anchor links:
BenchmarkingDiscourse: icon to the left, shows on hover, only icon is linked, points to anchor Carbon design system: same as Discourse Apple Developer: same as Discourse (but icon to the right) React documentation: same as Discourse (but icon to the right) MDN Docs: hash to the left on hover, both heading and icon point to anchor GitHub documentation: icon to the right, always visible, both heading and icon point to anchor Material: icon to the left shows on hover, copies link Google Cloud documentation: same as Material (unsurprisingly), icon to the right |
Gov.uk doesn't seem to use anchor links on headings. Headings have ids (so can be linked to), but anchor is only accessible via table of contents, not the heading itself. https://www.gov.uk/government/news/bird-flu-avian-influenza-latest-situation-in-england#cases |
@bartaz The request to have the headings clickable comes from the documentation team |
Yes, I know. We are just gathering examples of how others are doing something similar. |
Hold on, we do have a link icon in the Figma library! It just doesn't seem to be implemented. Could we just add it to Vanilla? @lyubomir-popov @bartaz |
WG: Link icon is a good fit. |
@bartaz What do we have to do to get this upstreamed to vanilla? |
@petesfrench Create a PR and we can take it from there in review. |
It may be good to verify it first by some local implementation on one of the docs websites, to see if that works as intended in the context of the docs. |
Visual
Normal:
Hover:
Context
All docs
SCSS example
The text was updated successfully, but these errors were encountered: