diff options
| author | Jacob Thornton <[email protected]> | 2012-02-21 23:18:18 -0800 |
|---|---|---|
| committer | Jacob Thornton <[email protected]> | 2012-02-21 23:18:18 -0800 |
| commit | f3b6cf1d6d65ccc640152aa4edb88cbea05a8b45 (patch) | |
| tree | b8fff7c4434ad1ee48b4aa2e4afa24b844c0a717 /less | |
| parent | 5ad5dde1e24f668cf9b720dd59fc2a7d4808c0b3 (diff) | |
| parent | a139167489e249345933b1e58cc7c53542abab97 (diff) | |
| download | bootstrap-f3b6cf1d6d65ccc640152aa4edb88cbea05a8b45.tar.xz bootstrap-f3b6cf1d6d65ccc640152aa4edb88cbea05a8b45.zip | |
Merge branch '2.0.2-wip' of https://github.com/twitter/bootstrap into 2.0.2-wip
Conflicts:
docs/assets/bootstrap.zip
less/mixins.less
Diffstat (limited to 'less')
| -rw-r--r-- | less/button-groups.less | 1 | ||||
| -rw-r--r-- | less/dropdowns.less | 37 | ||||
| -rw-r--r-- | less/mixins.less | 2 | ||||
| -rw-r--r-- | less/navbar.less | 51 | ||||
| -rw-r--r-- | less/navs.less | 4 | ||||
| -rw-r--r-- | less/tables.less | 8 |
6 files changed, 88 insertions, 15 deletions
diff --git a/less/button-groups.less b/less/button-groups.less index a04220a9a..cfb25f140 100644 --- a/less/button-groups.less +++ b/less/button-groups.less @@ -137,6 +137,7 @@ .btn-inverse { .caret { border-top-color: @white; + border-bottom-color: @white; .opacity(75); } } diff --git a/less/dropdowns.less b/less/dropdowns.less index fa46e288b..12ce7c2e5 100644 --- a/less/dropdowns.less +++ b/less/dropdowns.less @@ -13,7 +13,9 @@ .open .dropdown-toggle { outline: 0; } + // Dropdown arrow/caret +// -------------------- .caret { display: inline-block; width: 0; @@ -29,6 +31,7 @@ .opacity(30); content: "\2193"; } + .dropdown .caret { margin-top: 8px; margin-left: 2px; @@ -37,7 +40,9 @@ .open.dropdown .caret { .opacity(100); } + // The dropdown menu (ul) +// ---------------------- .dropdown-menu { position: absolute; top: 100%; @@ -62,11 +67,10 @@ *border-right-width: 2px; *border-bottom-width: 2px; - // Allow for dropdowns to go bottom up (aka, dropup-menu) - &.bottom-up { - top: auto; - bottom: 100%; - margin-bottom: 2px; + // Aligns the dropdown menu to right + &.pull-right { + right: 0; + left: auto; } // Dividers (basically an hr) within the dropdown @@ -87,6 +91,7 @@ } // Hover state +// ----------- .dropdown-menu li > a:hover, .dropdown-menu .active > a, .dropdown-menu .active > a:hover { @@ -96,6 +101,7 @@ } // Open state for the dropdown +// --------------------------- .dropdown.open { // IE7's z-index only goes to the nearest positioned ancestor, which would // make the menu appear below buttons that appeared later on the page @@ -117,7 +123,28 @@ right: 0; } +// Allow for dropdowns to go bottom up (aka, dropup-menu) +// ------------------------------------------------------ +// Just add .dropup after the standard .dropdown class and you're set, bro. +// TODO: abstract this so that the navbar fixed styles are not placed here? +.dropup, +.navbar-fixed-bottom .dropdown { + // Reverse the caret + .caret { + border-top: 0; + border-bottom: 4px solid @black; + content: "\2191"; + } + // Different positioning for bottom up menu + .dropdown-menu { + top: auto; + bottom: 100%; + margin-bottom: 1px; + } +} + // Typeahead +// --------- .typeahead { margin-top: 2px; // give it some space to breathe .border-radius(4px); diff --git a/less/mixins.less b/less/mixins.less index 2a184aaba..2cd916707 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -589,4 +589,4 @@ } -}
\ No newline at end of file +} diff --git a/less/navbar.less b/less/navbar.less index 87f260699..1bc6b185b 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -20,6 +20,12 @@ .box-shadow(@shadow); } +// Set width to auto for default container +// We then reset it for fixed navbars in the #gridSystem mixin +.navbar .container { + width: auto; +} + // Navbar button for toggling navbar items in responsive layouts .btn-navbar { display: none; @@ -153,22 +159,37 @@ } + // FIXED NAVBAR // ------------ -.navbar-fixed-top { +// Shared (top/bottom) styles +.navbar-fixed-top, +.navbar-fixed-bottom { position: fixed; - top: 0; right: 0; left: 0; z-index: @zindexFixedNavbar; + margin-bottom: 0; // remove 18px margin for static navbar } -.navbar-fixed-top .navbar-inner { +.navbar-fixed-top .navbar-inner, +.navbar-fixed-bottom .navbar-inner { padding-left: 0; padding-right: 0; .border-radius(0); } +// Fixed to top +.navbar-fixed-top { + top: 0; +} + +// Fixed to bottom +.navbar-fixed-bottom { + bottom: 0; +} + + // NAVIGATION // ---------- @@ -259,11 +280,27 @@ left: 10px; } } - +// Menu position and menu caret support for dropups via extra bottom-up class +.navbar-fixed-bottom .dropdown-menu { + &:before { + border-top: 7px solid #ccc; + border-top-color: rgba(0, 0, 0, 0.2); + border-bottom: 0; + bottom: -7px; + top: auto; + } + &:after { + border-top: 6px solid #ffffff; + border-bottom: 0; + bottom: -6px; + top: auto; + } +} // Dropdown toggle caret .navbar .nav .dropdown-toggle .caret, .navbar .nav .open.dropdown .caret { border-top-color: @white; + border-bottom-color: @white; } .navbar .nav .active .caret { .opacity(100); @@ -282,7 +319,11 @@ } // Right aligned menus need alt position -.navbar .nav.pull-right .dropdown-menu { +// TODO: rejigger this at some point to simplify the selectors +.navbar .nav.pull-right .dropdown-menu, +.navbar .nav .dropdown-menu.pull-right { + left: auto; + right: 0; &:before { left: auto; right: 12px; diff --git a/less/navs.less b/less/navs.less index a940cc13c..e00bffe5f 100644 --- a/less/navs.less +++ b/less/navs.less @@ -204,11 +204,13 @@ .nav-tabs .dropdown-toggle .caret, .nav-pills .dropdown-toggle .caret { border-top-color: @linkColor; + border-bottom-color: @linkColor; margin-top: 6px; } .nav-tabs .dropdown-toggle:hover .caret, .nav-pills .dropdown-toggle:hover .caret { border-top-color: @linkColorHover; + border-bottom-color: @linkColorHover; } // Active dropdown links @@ -216,6 +218,7 @@ .nav-tabs .active .dropdown-toggle .caret, .nav-pills .active .dropdown-toggle .caret { border-top-color: @grayDark; + border-bottom-color: @grayDark; } // Active:hover dropdown links @@ -238,6 +241,7 @@ .nav .open.active .caret, .nav .open a:hover .caret { border-top-color: @white; + border-bottom-color: @white; .opacity(100); } diff --git a/less/tables.less b/less/tables.less index 1342de2ff..d8bce582f 100644 --- a/less/tables.less +++ b/less/tables.less @@ -64,13 +64,12 @@ table { .table-bordered { border: 1px solid #ddd; + border-left: 0; border-collapse: separate; // Done so we can round those corners! *border-collapse: collapsed; // IE7 can't round corners anyway .border-radius(4px); - th + th, - td + td, - th + td, - td + th { + th, + td { border-left: 1px solid #ddd; } // Prevent a double border @@ -78,6 +77,7 @@ table { tbody:first-child tr:first-child th, tbody:first-child tr:first-child td { border-top: 0; + border-bottom: 1px solid #ddd; } // For first th or td in the first row in the first thead or tbody thead:first-child tr:first-child th:first-child, |
