Commit f2015b95 authored by Jonathan Neal's avatar Jonathan Neal
Browse files

Educate this rule

parent 73a09f25
Branches unavailable
No related merge requests found
Showing with 13 additions and 1 deletion
+13 -1
......@@ -98,7 +98,19 @@
color: white;
}
/* Permalink adjustment for sticky nav */
/*
* About this selector:
* `.g-subnav ~ *` finds all elements after the navigation.
* `:target` finds the active permalink on the page.
*
* About this style:
* `scroll-margin-top` adjusts the vertical scroll of a permalink.
* `64px` adjusts the scroll to account for the navigation.
* `0.5em` further adjusts the scroll to give the permalink breathing room.
*
* See: https://developer.mozilla.org/en-US/docs/Web/CSS/:target
* See: https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-margin-top
*/
.g-subnav ~ * :target {
scroll-margin-top: calc(64px + 0.5em);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment