From 918a17a30bbaed3f7d8c80a30b7766b95e636dff Mon Sep 17 00:00:00 2001 From: Burak Tuyan Date: Mon, 30 Jan 2012 00:50:47 +0200 Subject: 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 --- less/dropdowns.less | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'less/dropdowns.less') 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 -- cgit v1.2.3 From 8bd67bb124ccc87ecfe7959f3e75bb497d7991e1 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Tue, 21 Feb 2012 22:09:51 -0800 Subject: clean up and simplify support for bottom navbar by automagically turning dropdowns into dropups --- less/dropdowns.less | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'less/dropdowns.less') diff --git a/less/dropdowns.less b/less/dropdowns.less index a0753f200..12ce7c2e5 100644 --- a/less/dropdowns.less +++ b/less/dropdowns.less @@ -126,7 +126,9 @@ // Allow for dropdowns to go bottom up (aka, dropup-menu) // ------------------------------------------------------ // Just add .dropup after the standard .dropdown class and you're set, bro. -.dropup { +// 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; -- cgit v1.2.3