Added heading links to URL fragments

This commit is contained in:
Steven Engler
2019-09-17 14:22:13 -04:00
parent 52526aa5b6
commit c469a64a65
3 changed files with 119 additions and 1 deletions

View File

@ -13,6 +13,43 @@ h1, h2, h3, h4, h5, h6 {
margin-top: 1.5em;
}
@media (hover: hover) {
/* For devices which support hover, hide the heading URL fragment
link/icon until the mouse hovers over the heading */
h1:hover .heading-anchor,
h2:hover .heading-anchor,
h3:hover .heading-anchor,
h4:hover .heading-anchor,
h5:hover .heading-anchor,
h6:hover .heading-anchor {
visibility: visible;
}
h1 .heading-anchor,
h2 .heading-anchor,
h3 .heading-anchor,
h4 .heading-anchor,
h5 .heading-anchor,
h6 .heading-anchor {
visibility: hidden;
}
}
.heading-anchor {
color: grey;
margin-left: 0.5em;
font-size: 0.75em;
}
.heading-anchor:hover {
text-decoration: none;
}
.heading-anchor img {
height: 1em;
}
a {
text-decoration: none;
}