Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Integrate Drupal 8 Toolbar w/ Bootstrap Fixed Top Nav
libraries-extend:
# Improve interoperability between MyTheme and the Drupal admin toolbar.
toolbar/toolbar:
- mytheme/toolbar
toolbar:
css:
theme:
css/toolbar.css: {}
@media only screen and (max-width: 976px) {
.toolbar-fixed .navbar.fixed-top {
top: 39px !important;
}
.toolbar-fixed.toolbar-horizontal.toolbar-tray-open:not(.toolbar-loading) .navbar.fixed-top {
top: 79px !important;
}
}
@media only screen and (min-width: 977px) and (max-width: 1024px) {
.toolbar-fixed .navbar.fixed-top {
top: 39px !important;
}
.toolbar-fixed.toolbar-horizontal.toolbar-tray-open .navbar.fixed-top {
top: 79px !important;
}
}
/* Ensure navbar scrolls when toolbar is also configured to scroll on smaller screens or when loading. */
@media only screen and (max-width: 1024px) {
.toolbar-loading .navbar.fixed-top,
.toolbar-vertical:not(.toolbar-fixed) .navbar.fixed-top {
position: absolute;
top: 39px;
}
}
@media only screen and (min-width: 1025px) {
.toolbar-fixed:not(.toolbar-loading) .navbar.fixed-top {
top: 39px !important;
}
.toolbar-fixed.toolbar-horizontal.toolbar-tray-open:not(.toolbar-loading) .navbar.fixed-top {
top: 79px !important;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment