aboutsummaryrefslogtreecommitdiff
path: root/less/dropdowns.less
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2012-02-21 22:01:39 -0800
committerMark Otto <[email protected]>2012-02-21 22:01:39 -0800
commit20221a67c2590e5d5d2d3a78dd79d61498e80661 (patch)
tree1029abfbdc4a3e9802bf87ea2dfe4c1f9d6ebaff /less/dropdowns.less
parentb4cc6c74f59442879ba2b1ed3e86d26e62390835 (diff)
parent19b70dc4142bb0737f4ed71ac5e559585f9b9150 (diff)
downloadbootstrap-20221a67c2590e5d5d2d3a78dd79d61498e80661.tar.xz
bootstrap-20221a67c2590e5d5d2d3a78dd79d61498e80661.zip
Merge branch '2.0/fork/components/dropup' of https://github.com/buraktuyan/bootstrap into buraktuyan-2.0/fork/components/dropup
Conflicts: docs/assets/css/bootstrap.css docs/components.html docs/templates/pages/components.mustache less/navbar.less
Diffstat (limited to 'less/dropdowns.less')
-rw-r--r--less/dropdowns.less35
1 files changed, 30 insertions, 5 deletions
diff --git a/less/dropdowns.less b/less/dropdowns.less
index fa46e288b..a0753f200 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,26 @@
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.
+.dropup {
+ // 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);