mirror of
https://github.com/mkdocs/mkdocs.git
synced 2026-03-27 18:08:31 +07:00
Remove addition of clicky class to body and animations. (#1387)
This commit is contained in:
committed by
Waylan Limberg
parent
47afdfd77e
commit
cd396ada13
@@ -39,13 +39,7 @@ ul.nav .main {
|
||||
/*
|
||||
* The code below adds some padding to the top of the current anchor target so
|
||||
* that, when navigating to it, the header isn't hidden by the navbar at the
|
||||
* top. This is especially complicated because we want to *remove* the padding
|
||||
* after navigation so that hovering over the header shows the permalink icon
|
||||
* correctly. Thus, we create a CSS animation to remove the extra padding after
|
||||
* a second. We have two animations so that navigating to an anchor within the
|
||||
* page always restarts the animation.
|
||||
*
|
||||
* See <https://github.com/mkdocs/mkdocs/issues/843> for more details.
|
||||
* top.
|
||||
*/
|
||||
:target::before {
|
||||
content: "";
|
||||
@@ -53,25 +47,6 @@ ul.nav .main {
|
||||
margin-top: -75px;
|
||||
height: 75px;
|
||||
pointer-events: none;
|
||||
animation: 0s 1s forwards collapse-anchor-padding-1;
|
||||
}
|
||||
|
||||
.clicky :target::before {
|
||||
animation-name: collapse-anchor-padding-2;
|
||||
}
|
||||
|
||||
@keyframes collapse-anchor-padding-1 {
|
||||
to {
|
||||
margin-top: 0;
|
||||
height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes collapse-anchor-padding-2 {
|
||||
to {
|
||||
margin-top: 0;
|
||||
height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
h1 {
|
||||
|
||||
@@ -78,12 +78,7 @@ $(document).ready(function() {
|
||||
|
||||
$('body').scrollspy({
|
||||
target: '.bs-sidebar',
|
||||
});
|
||||
|
||||
/* Toggle the `clicky` class on the body when clicking links to let us
|
||||
retrigger CSS animations. See ../css/base.css for more details. */
|
||||
$('a').click(function(e) {
|
||||
$('body').toggleClass('clicky');
|
||||
offset: 100
|
||||
});
|
||||
|
||||
/* Prevent disabled links from causing a page reload */
|
||||
|
||||
Reference in New Issue
Block a user