From 11c6ab767cab5384188a301f7c9366b212432e81 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 14 Dec 2013 13:22:56 -0800 Subject: [PATCH] Fixes #10370: Improved and deprecated dropdown menu alignment options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Removes an old pair of selectors that didn’t properly target the right-aligned navbar alignment of dropdown menus. * Deprecates the `.pull-right` alignment in favor of a more specific and unique class name. * Adds `.dropdown-menu-right` as the new alignment class. This is then mixin-ed into the `.navbar-right.navbar-nav` dropdown menus for auto-alignment. * To override that auto-alignment, use `.dropdown-menu-left` as needed. --- components.html | 8 ++++++-- dist/css/bootstrap.css | 17 ++++++++++++----- dist/css/bootstrap.min.css | 2 +- less/dropdowns.less | 28 +++++++++++++++++++++++++++- less/navbar.less | 7 ------- 5 files changed, 46 insertions(+), 16 deletions(-) diff --git a/components.html b/components.html index 8377b81238..a335c06c9d 100644 --- a/components.html +++ b/components.html @@ -902,9 +902,13 @@ base_url: "../" {% endhighlight %} -

Add .pull-right to a .dropdown-menu to right align the dropdown menu.

+

Add .dropdown-menu-right to a .dropdown-menu to right align the dropdown menu.

+
+

Deprecated .pull-right alignment

+

As of v3.1, we've deprecated .pull-right on dropdown menus. To right-align a menu, use .dropdown-menu-right. Right-aligned nav components in the navbar use a mixin version of this class to automatically align the menu. To override it, use .dropdown-menu-left.

+
{% highlight html %} -