Skip to content
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

Add anchor indicator #33

Closed
renintw opened this issue May 30, 2022 Discussed in #26 · 4 comments · Fixed by #46
Closed

Add anchor indicator #33

renintw opened this issue May 30, 2022 Discussed in #26 · 4 comments · Fixed by #46
Assignees
Labels

Comments

@renintw
Copy link
Contributor

renintw commented May 30, 2022

Discussed in #26

Originally posted by iandunn May 28, 2022
Our pages already have anchors for deep-linking to sections, but it's helpful to show a visual indicator of that.

Example: https://api.slack.com/reference/surfaces/formatting#escaping

Screen Shot 2022-05-27 at 1 20 16 PM

@renintw renintw added the ui label May 30, 2022
@iandunn iandunn self-assigned this May 30, 2022
@ryelle
Copy link
Contributor

ryelle commented May 31, 2022

FYI, there's already a pattern for this on the handbooks, if you hover or focus over a heading you can see a link icon:

Screen Shot 2022-05-31 at 12 20 53 PM

See https://meta.trac.wordpress.org/ticket/6171

@iandunn
Copy link
Member

iandunn commented May 31, 2022

Nice, thanks!

bazza pushed a commit to WordPress/wordpress.org that referenced this issue May 31, 2022
Using `overflow: auto` as a clearfix prevented the `.toc-heading a` Dashicon from showing up on hover. 

This also replaces the various `padding-left` values with a single value that works across all breakpoints, to ensure that there's enough room for the icon.

See WordPress/wporg-developer#33



git-svn-id: https://meta.svn.wordpress.org/sites/trunk@11901 74240141-8908-4e6f-9713-ba540dce6ec7
@iandunn
Copy link
Member

iandunn commented May 31, 2022

I made WordPress/wordpress.org@d90623f on the production theme, since it fixes a bug there. I'll backport it to this repo, and then add any experimental stuff.

@joyously
Copy link

joyously commented Jun 9, 2022

As mentioned on Slack on June 2, the fix caused other problems with the Table of Contents, which are still present.
code-ref

Today I noticed also that a heading with a link gets split into two a tags which both have a negative margin for the link icon, so the text overlaps. See https://developer.wordpress.org/reference/classes/wp_rewrite/ for an example.
WP_Rewrite Class WordPress Developer Resources-27

bazza pushed a commit to WordPress/wordpress.org that referenced this issue Jun 9, 2022
bazza pushed a commit to WordPress/wordpress.org that referenced this issue Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants