Skip to content

Instantly share code, notes, and snippets.

@mateusvelleda
Last active July 10, 2020 20:49
Show Gist options
  • Save mateusvelleda/5da210640a0a2dde70a3b4f98f918618 to your computer and use it in GitHub Desktop.
Save mateusvelleda/5da210640a0a2dde70a3b4f98f918618 to your computer and use it in GitHub Desktop.
Wordpress Discrete / Unobtrusive Admin Bar
// overrides WP admin bar behavior
// use mouseover on screen's top left corner to show it
@keyframes hideAdminBar {
from {
width: 35px;
}
to {
width: 35px;
}
}
@keyframes showAdminBar {
from {
width: 100%;
}
to {
width: 100%;
}
}
html[lang] {
margin-top: 0 !important;//WP pushes the page 32px down when the user is logged in, in order to avoid content behind the bar
#wpadminbar {
min-width: 0;
overflow: hidden;
animation-name: hideAdminBar;
animation-duration: 1s;
animation-delay: 3s;
animation-iteration-count: 1;
animation-fill-mode: forwards;
&:hover {
overflow: visible;
animation-name: showAdminBar;
animation-duration: 1s;
animation-delay: 0;
animation-iteration-count: 1;
animation-fill-mode: forwards;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment