Skip to content

Commit aaac7b0

Browse files
maazadeebmmistakes
authored andcommittedDec 4, 2017
Tooltips for masthead links (mmistakes#1380)
1 parent 95cb538 commit aaac7b0

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed
 

‎_includes/masthead.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
{% else %}
1111
{% assign domain = site.url | append: site.baseurl %}
1212
{% endif %}
13-
<li class="masthead__menu-item"><a href="{{ domain }}{{ link.url }}">{{ link.title }}</a></li>
13+
<li class="masthead__menu-item">
14+
<a href="{{ domain }}{{ link.url }}" {% if link.description %} title="{{ link.description }}" {% endif %}>{{ link.title }}</a>
15+
</li>
1416
{% endfor %}
1517
</ul>
1618
<button type="button">

‎docs/_docs/07-navigation.md

+2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ Which will give you a responsive masthead similar to this:
3434
3535
![priority plus masthead animation]({{ "/assets/images/mm-priority-plus-masthead.gif" | absolute_url }})
3636
37+
Optionally, you can add a `description` key per title in the `main` key. This `description` will show up like a tooltip, when the user hovers over the link on a desktop browser.
38+
3739
**ProTip:** Put the most important links first so they're always visible and not hidden behind the **menu toggle**.
3840
{: .notice--info}
3941

0 commit comments

Comments
 (0)
Please sign in to comment.