From 92adcfabb58cc5a8ce41c34bec0ec36a642e5610 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 12 May 2013 15:47:18 -0700 Subject: Start some nav and dropdown cleanup * Remove border-radii on top of tab dropdown menus * Remove the .dropdown and .dropup styles and instead place on all * Use on dropdown carets intead of separately applying margin with a top alignment * Some other misc cleanup --- less/dropdowns.less | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) (limited to 'less/dropdowns.less') diff --git a/less/dropdowns.less b/less/dropdowns.less index c4fd8598b..45242fb68 100644 --- a/less/dropdowns.less +++ b/less/dropdowns.less @@ -2,14 +2,8 @@ // Dropdown menus // -------------------------------------------------- - -// Use the .menu class on any
  • element within the topbar or ul.tabs and you'll get some superfancy dropdowns -.dropup, -.dropdown { - position: relative; -} -.dropdown-toggle:active, -.open .dropdown-toggle { +// Remove the outline when :focus is triggered +.open > a { outline: 0; } @@ -19,19 +13,14 @@ display: inline-block; width: 0; height: 0; - vertical-align: top; + margin-left: 2px; + vertical-align: middle; border-top: 4px solid #000; border-right: 4px solid transparent; border-left: 4px solid transparent; content: ""; } -// Place the caret -.dropdown .caret { - margin-top: 8px; - margin-left: 2px; -} - // The dropdown menu (ul) // ---------------------- .dropdown-menu { -- cgit v1.2.3 From 2d10d61fded8246673a5c7c14f955a80bc61a866 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sun, 12 May 2013 16:03:56 -0700 Subject: Restore commented out dropdown styles, get open dropdown state working again --- less/dropdowns.less | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'less/dropdowns.less') diff --git a/less/dropdowns.less b/less/dropdowns.less index 45242fb68..1b9165b4e 100644 --- a/less/dropdowns.less +++ b/less/dropdowns.less @@ -2,10 +2,6 @@ // Dropdown menus // -------------------------------------------------- -// Remove the outline when :focus is triggered -.open > a { - outline: 0; -} // Dropdown arrow/caret // -------------------- @@ -107,9 +103,15 @@ // Open state for the dropdown // --------------------------- .open { - & > .dropdown-menu { + // Show the menu + > .dropdown-menu { display: block; } + + // Remove the outline when :focus is triggered + > a { + outline: 0; + } } // Right aligned dropdowns -- cgit v1.2.3 From 92245e8bc70f8d2e48036b7ba088551d07db29ca Mon Sep 17 00:00:00 2001 From: fat Date: Thu, 16 May 2013 12:50:06 -0700 Subject: change dropdown strategy to use an overlay - fixes mobile click anywhere + allows for firefox middle click --- less/dropdowns.less | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'less/dropdowns.less') diff --git a/less/dropdowns.less b/less/dropdowns.less index 1b9165b4e..e2c9805ae 100644 --- a/less/dropdowns.less +++ b/less/dropdowns.less @@ -114,6 +114,18 @@ } } + +// Backdrop to catch body clicks on mobile, etc. +// --------------------------- +.dropdown-backdrop { + position: fixed; + left: 0; + right: 0; + bottom: 0; + top: 0; + z-index: @zindex-dropdown - 10; +} + // Right aligned dropdowns // --------------------------- .pull-right > .dropdown-menu { -- cgit v1.2.3