Skip to content

Commit

Permalink
Handbook: Always show heading link indicator
Browse files Browse the repository at this point in the history
Only showing it on hover can results in folks not knowing it's there. Hovering isn't a UI concept on mobile devices either, which makes the problem worse. Hovering is best used for design enhancements rather than functionality.

See https://ux.stackexchange.com/questions/20866/ui-hover-focus-to-reveal-controls
See https://ux.stackexchange.com/questions/82015/how-do-users-know-to-hover-over-elements
  • Loading branch information
iandunn authored and renintw committed Jun 7, 2022
1 parent 75f0711 commit a93ecc4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions source/wp-content/plugins/handbook/inc/table-of-contents.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ class WPorg_Handbook_TOC {
protected $styles = '<style>
.toc-jump { text-align: right; font-size: 12px; }
.toc-heading a { color: inherit; font-weight: inherit; margin-left: -25px; text-decoration: none !important; }
.toc-heading a:before { visibility: hidden; vertical-align: middle; margin-top: -5px; margin-right: 5px; }
.toc-heading a:before { vertical-align: middle; margin-top: -5px; margin-right: 5px; }
.toc-heading:target a:before { margin-left: -8px; margin-right: 13px; }
.toc-heading a:hover:before, .toc-heading a:focus:before { visibility: visible; }
</style>';

/**
Expand Down

0 comments on commit a93ecc4

Please sign in to comment.