Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed navbar on small screens

Signed-off-by: Rachel Baker <rachel@rachelbaker.me>
  • Loading branch information...
commit 8f486e89f18827cdcf6e1c53033c9123fb482695 1 parent f71eb15
@rachelbaker authored
Showing with 43 additions and 0 deletions.
  1. +18 −0 css/bootstrapwp.css
  2. +25 −0 css/less/bswp-overrides.less
View
18 css/bootstrapwp.css
@@ -6716,6 +6716,7 @@ Overriding some defaults from the Bootstrap defaults to improve/fix integration
position: relative;
}
.navbar-relative-top .navbar-inner {
+ min-height: 40px;
padding-right: 0;
padding-left: 0;
-webkit-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
@@ -6728,6 +6729,23 @@ Overriding some defaults from the Bootstrap defaults to improve/fix integration
.navbar-relative-top .container {
max-width: 1170px;
}
+@media (max-width: 979px) {
+ .navbar-relative-top {
+ position: static;
+ margin-left: -20px;
+ margin-right: -20px;
+ padding: 0;
+ }
+ .navbar-relative-top {
+ margin-bottom: 20px;
+ }
+ .navbar-relative-top .navbar-inner {
+ padding: 10px;
+ }
+}
+@media (max-width: 767px) {
+
+}
.navbar div.nav {
position: relative;
left: 0;
View
25 css/less/bswp-overrides.less
@@ -16,6 +16,7 @@ Overriding some defaults from the Bootstrap defaults to improve/fix integration
margin-bottom: 0;
position: relative;
.navbar-inner {
+ min-height: @navbarHeight;
padding-right: 0;
padding-left: 0;
-webkit-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
@@ -29,6 +30,30 @@ Overriding some defaults from the Bootstrap defaults to improve/fix integration
max-width: 1170px;
}
}
+
+@media (max-width: @navbarCollapseWidth) {
+
+ // Unfix the navbars
+ .navbar-relative-top {
+ position: static;
+ margin-left: -20px;
+ margin-right: -20px;
+ padding: 0;
+ }
+
+ .navbar-relative-top {
+ margin-bottom: @baseLineHeight;
+ }
+
+ .navbar-relative-top .navbar-inner {
+ padding: 10px;
+ }
+}
+@media (max-width: 767px) {
+ // Negative indent the now static "fixed" navbar
+
+}
+
// Navbar Fixes for wp_list_pages()
.navbar div.nav {
position: relative;

0 comments on commit 8f486e8

Please sign in to comment.
Something went wrong with that request. Please try again.