Make "to-bottom" link sticky too

This commit is contained in:
Tanguy Fardet 2022-09-28 17:11:59 +02:00 committed by Drew DeVault
parent f58bbde6bf
commit 2a9b879050
2 changed files with 8 additions and 2 deletions

View File

@ -131,7 +131,7 @@
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>
<a href="#bottom">go to bottom »</a><br> <a class="to-bottom" href="#bottom">go to bottom »</a><br>
<a class="to-top" href="#">go to top »</a> <a class="to-top" href="#">go to top »</a>
</div> </div>
<div class="col-lg-9 col-md-12"> <div class="col-lg-9 col-md-12">

View File

@ -89,12 +89,18 @@ a[href^="mailto:"] {
font-family: monospace; font-family: monospace;
} }
.to-top { .to-bottom {
position: -webkit-sticky; /* for safari */ position: -webkit-sticky; /* for safari */
position: sticky; position: sticky;
top: 0; top: 0;
} }
.to-top {
position: -webkit-sticky; /* for safari */
position: sticky;
top: 1.5em;
}
@media(prefers-color-scheme: dark) { @media(prefers-color-scheme: dark) {
.cm-s-default.CodeMirror { background: #272822; color: #f8f8f2; } .cm-s-default.CodeMirror { background: #272822; color: #f8f8f2; }
.cm-s-default div.CodeMirror-selected { background: #49483E; } .cm-s-default div.CodeMirror-selected { background: #49483E; }