diff options
| author | Burak Tuyan <[email protected]> | 2012-01-30 00:50:47 +0200 |
|---|---|---|
| committer | Burak Tuyan <[email protected]> | 2012-01-30 00:50:47 +0200 |
| commit | 918a17a30bbaed3f7d8c80a30b7766b95e636dff (patch) | |
| tree | c6f62cdaeb33a5c8b6fd6eb0d1a7d8bb74f5e350 /less | |
| parent | 7bf27674523c35f8803311a964dc72a7093351c0 (diff) | |
| download | bootstrap-918a17a30bbaed3f7d8c80a30b7766b95e636dff.tar.xz bootstrap-918a17a30bbaed3f7d8c80a30b7766b95e636dff.zip | |
Adding dropup support to split buttons and navbar
* Documents the hidden .dropdown-menu.bottom-up option (to be used for dropups)
* Extends the .bottom-up class to carets and all relevant caret styles
* Adds .dropdown-menu.pull-right class for right-aligned dropdowns and dropups
* Adds examples and some information to the "split dropdown" and "navbar" sections of the Docs
Diffstat (limited to 'less')
| -rw-r--r-- | less/button-groups.less | 1 | ||||
| -rw-r--r-- | less/dropdowns.less | 16 | ||||
| -rw-r--r-- | less/navbar.less | 20 | ||||
| -rw-r--r-- | less/navs.less | 1 |
4 files changed, 35 insertions, 3 deletions
diff --git a/less/button-groups.less b/less/button-groups.less index 7367103ca..d02b0137a 100644 --- a/less/button-groups.less +++ b/less/button-groups.less @@ -136,6 +136,7 @@ .success { .caret { border-top-color: @white; + border-bottom-color: @white; .opacity(75); } } diff --git a/less/dropdowns.less b/less/dropdowns.less index 83f535ae8..ff78955b7 100644 --- a/less/dropdowns.less +++ b/less/dropdowns.less @@ -29,6 +29,14 @@ .opacity(30); content: "\2193"; } + + // Allow for caret to show up (goes well with dropup-menus) + &.bottom-up { + border-top: 0; + border-bottom: 4px solid @black; + content: "\2191"; + } + .dropdown .caret { margin-top: 8px; margin-left: 2px; @@ -68,7 +76,13 @@ &.bottom-up { top: auto; bottom: 100%; - margin-bottom: 2px; + margin-bottom: 1px; + } + + // Aligns the dropdown menu to right + &.pull-right { + right: 0; + left: auto; } // Dividers (basically an hr) within the dropdown diff --git a/less/navbar.less b/less/navbar.less index 25ca7b4e2..eb8ad6e01 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -253,11 +253,27 @@ left: 10px; } } - +// Menu position and menu caret support for dropups via extra bottom-up class +.navbar .dropdown-menu.bottom-up { + &: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); @@ -276,7 +292,7 @@ } // Right aligned menus need alt position -.navbar .nav.pull-right .dropdown-menu { +.navbar .nav.pull-right .dropdown-menu, .navbar .nav .dropdown-menu.pull-right { left: auto; right: 0; &:before { diff --git a/less/navs.less b/less/navs.less index aa718cd74..522ad340d 100644 --- a/less/navs.less +++ b/less/navs.less @@ -227,6 +227,7 @@ .nav .open.active .caret, .nav .open a:hover .caret { border-top-color: @white; + border-bottom-color: @white; .opacity(100); } |
