Skip to content

Commit 8851126

Browse files
committed
Merge pull request #19 from bumbu/fix2
Set navbar media sizes using variables
2 parents 1fcce60 + cb3eb4a commit 8851126

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

stylus/responsive-navbar.styl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55

66
// TABLETS AND BELOW
77
// -----------------
8-
@media (max-width: 980px) {
8+
$media = '(max-width:' + $navbarCollapseWidth + ')'
9+
@media $media {
910

1011
// UNFIX THE TOPBAR
1112
// ----------------
@@ -178,7 +179,8 @@
178179
// DEFAULT DESKTOP
179180
// ---------------
180181

181-
@media (min-width: $navbarCollapseDesktopWidth) {
182+
$media = '(min-width:' + $navbarCollapseDesktopWidth + ')'
183+
@media $media {
182184

183185
// Required to make the collapsing navbar work on regular desktops
184186
.nav-collapse.collapse {

stylus/variables.styl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ $wellBackground = #f5f5f5;
176176

177177

178178
// Navbar
179-
// NOTE: navbarCollapseWidth is not used because of a stylus bug, you must go edit the value directly in the responsive-navbar file.
180179
// -------------------------
181180
$navbarCollapseWidth = 979px;
182181
$navbarCollapseDesktopWidth = $navbarCollapseWidth + 1;

0 commit comments

Comments
 (0)