Skip to content

Instantly share code, notes, and snippets.

@peterhartree
Last active August 29, 2015 14:09
Show Gist options
  • Save peterhartree/01b11c34e52e71f1c9c3 to your computer and use it in GitHub Desktop.
Save peterhartree/01b11c34e52e71f1c9c3 to your computer and use it in GitHub Desktop.
Compensate for the Bootstrap fixed top navigation bar, and offset if WordPress admin bar is visible.
// Compensate for the Bootstrap fixed top navigation bar.
//
// No styleguide reference.
body {
padding-top: @navbar-height;
}
// Offset fixed top navigation bar if WordPress admin bar is
// visible.
//
// No styleguide reference.
.admin-bar {
padding-top: @navbar-height + 46px;
.navbar-fixed-top {
margin-top: 46px;
}
}
@media screen and (min-width: 783px) {
.admin-bar {
padding-top: @navbar-height + 36px;
.navbar-fixed-top {
margin-top: 36px;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment