Last active
August 17, 2020 14:28
-
-
Save jameswilson/a797467fac5faf06825985ccc2846990 to your computer and use it in GitHub Desktop.
Integrate Drupal 8 Toolbar w/ Bootstrap Fixed Top Nav
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
libraries-extend: | |
# Improve interoperability between MyTheme and the Drupal admin toolbar. | |
toolbar/toolbar: | |
- mytheme/toolbar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
toolbar: | |
css: | |
theme: | |
css/toolbar.css: {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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