Skip to content

Commit

Permalink
LCS cherry-pick 3b3da46
Browse files Browse the repository at this point in the history
Show a permalink anchor when hovering over headings in main content (mmistakes#2251)

* Implement heading permalinks, close mmistakes#2246

Thanks to jekyll/jekyll for CSS.
Link anchor is visible when the mouse hovers over the title line.

* Build the updated _main.js
  • Loading branch information
iBug authored and duetosymmetry committed Aug 15, 2024
1 parent 87cc4ac commit 0f07561
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion _sass/_page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,26 @@
border-bottom: 1px solid $border-color;
}

p, li, dl {
h1, h2, h3, h4, h5, h6 {
.header-link {
position: relative;
left: 0.5em;
opacity: 0;
font-size: 0.8em;
-webkit-transition: opacity 0.2s ease-in-out 0.1s;
-moz-transition: opacity 0.2s ease-in-out 0.1s;
-o-transition: opacity 0.2s ease-in-out 0.1s;
transition: opacity 0.2s ease-in-out 0.1s;
}

&:hover .header-link {
opacity: 1;
}
}

p,
li,
dl {
font-size: 1em;
}

Expand Down

0 comments on commit 0f07561

Please sign in to comment.