diff options
Diffstat (limited to 'less')
-rw-r--r-- | less/bootstrap.less | 1 | ||||
-rw-r--r-- | less/navbar.less | 43 | ||||
-rw-r--r-- | less/responsive-navbar.less | 35 | ||||
-rw-r--r-- | less/subnav.less | 102 |
4 files changed, 76 insertions, 105 deletions
diff --git a/less/bootstrap.less b/less/bootstrap.less index 0b82b8a0e2..c43875a804 100644 --- a/less/bootstrap.less +++ b/less/bootstrap.less @@ -41,7 +41,6 @@ // Components: Nav @import "navs.less"; @import "navbar.less"; -@import "subnav.less"; @import "breadcrumbs.less"; @import "pagination.less"; @import "pager.less"; diff --git a/less/navbar.less b/less/navbar.less index 705169fe20..3305f722a1 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -362,3 +362,46 @@ right: 13px; } } + + +/* Subnav navbar +-------------------------------------------------- */ +// In the future, we may make two options available for the navbar: +// a default state, the lighter one, and the darker one as an option +// to enable. This would prevent some overriding back to defaults. + + +// Override the default .navbar +.navbar-subnav { + height: 36px; +} +.navbar-subnav .navbar-inner { + min-height: 36px; + padding: 0; + #gradient > .vertical(#f9f9f9, #eeeeee); + .box-shadow(none); + border: 1px solid #e5e5e5; +} + +// Change link colors back +.navbar-subnav .nav > li > a { + color: @linkColor; + text-shadow: 0 1px 0 rgba(255,255,255,.5); +} +.navbar-subnav .nav > li > a:hover { + color: @linkColorHover; +} + +// Dropdown carets +.navbar-subnav .nav li.dropdown .dropdown-toggle .caret, +.navbar-subnav .nav li.dropdown.open .caret { + border-top-color: @linkColor; + border-bottom-color: @linkColor; +} + +// Open dropdown dropdown-toggle +.navbar-subnav .nav .open > a { + color: @linkColorHover; +} + + diff --git a/less/responsive-navbar.less b/less/responsive-navbar.less index 8d31db5310..92e651e0ba 100644 --- a/less/responsive-navbar.less +++ b/less/responsive-navbar.less @@ -144,10 +144,41 @@ // DEFAULT DESKTOP // --------------- -// Required to make the collapsing navbar work on regular desktops @media (min-width: 980px) { + + // Required to make the collapsing navbar work on regular desktops .nav-collapse.collapse { height: auto !important; overflow: visible !important; } -}
\ No newline at end of file + + // Fixed subnav on scroll, but only for 980px and up (sorry IE!) + .subnav-fixed { + position: fixed; + top: 40px; + left: 0; + right: 0; + z-index: 1020; /* 10 less than .navbar-fixed to prevent any overlap */ + border-color: #d5d5d5; + border-width: 0 0 1px; /* drop the border on the fixed edges */ + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + -webkit-box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1); + -moz-box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1); + box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); /* IE6-9 */ + } + .subnav-fixed .nav { + max-width: 780px; + margin: 0 auto; + padding: 0 1px; + } + .subnav .nav > li:first-child > a, + .subnav .nav > li:first-child > a:hover { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + } + +} diff --git a/less/subnav.less b/less/subnav.less deleted file mode 100644 index 9d0e714dbd..0000000000 --- a/less/subnav.less +++ /dev/null @@ -1,102 +0,0 @@ -/* Subnav --------------------------------------------------- */ - - -/* Base -------------------------- */ -.subnav { - width: 100%; - height: 36px; - #gradient > .vertical(#f5f5f5, #eeeeee); - border: 1px solid #e5e5e5; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} - - -/* Nav links -------------------------- */ -.subnav .nav { - margin-bottom: 0; // remove default bottom margin of .nav -} -// Make list items appear inline -.subnav .nav > li { - float: left; -} -.subnav .nav > li > a { - padding: 9px 12px; - line-height: 18px; - border-left: 1px solid #f5f5f5; - border-right: 1px solid #e5e5e5; -} -.subnav .nav > .active > a, -.subnav .nav > .active > a:hover { - padding-left: 13px; - color: #777; - background-color: #e9e9e9; - border-right-color: #ddd; - border-left: 0; - -webkit-box-shadow: inset 0 3px 5px rgba(0,0,0,.05); - -moz-box-shadow: inset 0 3px 5px rgba(0,0,0,.05); - box-shadow: inset 0 3px 5px rgba(0,0,0,.05); -} -.subnav .nav > li:first-child > a, -.subnav .nav > li:first-child > a:hover { - border-left: 0; - padding-left: 12px; - -webkit-border-radius: 4px 0 0 4px; - -moz-border-radius: 4px 0 0 4px; - border-radius: 4px 0 0 4px; -} -.subnav .nav > li:last-child > a { - border-right: 0; -} - -/* Reposition the dropdown carets */ -.subnav .nav .dropdown-toggle .caret { - margin-top: 7px; -} -.nav .active .dropdown-toggle .caret { - border-top-color: #777; - border-bottom-color: #777; -} - -/* Dropdown menus get matching border-radius */ -.subnav .dropdown-menu { - -webkit-border-radius: 0 0 4px 4px; - -moz-border-radius: 0 0 4px 4px; - border-radius: 0 0 4px 4px; -} - - -/* Fixed subnav on scroll, but only for 980px and up (sorry IE!) */ -@media (min-width: 980px) { - .subnav-fixed { - position: fixed; - top: 40px; - left: 0; - right: 0; - z-index: 1020; /* 10 less than .navbar-fixed to prevent any overlap */ - border-color: #d5d5d5; - border-width: 0 0 1px; /* drop the border on the fixed edges */ - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - -webkit-box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1); - -moz-box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1); - box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1); - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); /* IE6-9 */ - } - .subnav-fixed .nav { - max-width: 780px; - margin: 0 auto; - padding: 0 1px; - } - .subnav .nav > li:first-child > a, - .subnav .nav > li:first-child > a:hover { - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - } -} |