From 6aa15eb01f2e50e394ae172ff41e5bc0583de6da Mon Sep 17 00:00:00 2001 From: Robert McLaws Date: Sun, 16 Sep 2012 03:02:31 -0400 Subject: Support for left-opening dropdown submenus Adds a new class called .dropdown-submenu-left. It is useful when you have a .pull-right DropDown that has submenus. Without this, the menu opens left past the page boundary, which can trigger the scrollbars and cause other nastiness. --- less/dropdowns.less | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) (limited to 'less') diff --git a/less/dropdowns.less b/less/dropdowns.less index bed158612..9622d2d46 100644 --- a/less/dropdowns.less +++ b/less/dropdowns.less @@ -163,7 +163,6 @@ .dropdown-submenu { position: relative; } - // Default dropdowns .dropdown-submenu > .dropdown-menu { top: 0; @@ -207,6 +206,40 @@ border-left-color: @dropdownLinkColorHover; } +// Left-opening Sub menus +// --------------------------- +.dropdown-submenu-left { + position: relative; +} +.dropdown-submenu-left > .dropdown-menu { + top: 0; + left: -100%; + margin-top: -6px; + margin-left: -1px; + -webkit-border-radius: 6px 0px 6px 6px; + -moz-border-radius: 6px 0px 6px 6px; + border-radius: 6px 0px 6px 6px; +} +.dropdown-submenu-left:hover > .dropdown-menu { + display: block; +} + +.dropdown-submenu-left > a:before { + display: block; + content: " "; + float: left; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; + border-width: 5px 5px 5px 0px; + border-right-color: darken(@dropdownBackground, 20%); + margin-top: 5px; + margin-left: -10px; +} +.dropdown-submenu-left:hover > a:after { + border-right-color: @dropdownLinkColorHover; +} // Tweak nav headers // ----------------- -- cgit v1.2.3 From ecbb0ed4df3975d473e3c3558db322e26c6620ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Cederstro=CC=88m?= Date: Thu, 27 Sep 2012 11:44:48 +0200 Subject: Making modal work with max width 767px - fixes #4860 --- less/responsive-767px-max.less | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'less') diff --git a/less/responsive-767px-max.less b/less/responsive-767px-max.less index 45ce4ebc7..1d5c1239c 100644 --- a/less/responsive-767px-max.less +++ b/less/responsive-767px-max.less @@ -107,7 +107,8 @@ right: 20px; width: auto; margin: 0; - &.fade.in { top: auto; } + &.fade { top: -100px; } + &.fade.in { top: 20px; } } } -- cgit v1.2.3 From 50355929887bf1ff3ecbf4269d0ff05438a6ef5a Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 1 Oct 2012 11:53:52 -0700 Subject: fixes #5193 manually: checkbox and radio padding in .controls-row --- less/forms.less | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'less') diff --git a/less/forms.less b/less/forms.less index c9fafec27..e3da82265 100644 --- a/less/forms.less +++ b/less/forms.less @@ -312,6 +312,11 @@ textarea[class*="span"], .row-fluid .controls-row [class*="span"] { float: left; } +// Explicity set top padding on all checkboxes/radios, not just first-child +.controls-row .checkbox[class*="span"], +.controls-row .radio[class*="span"] { + padding-top: 5px; +} -- cgit v1.2.3 From bc4f5d565ef2a7a8ff71f255d3c147efef4f7039 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 1 Oct 2012 12:04:10 -0700 Subject: fixes #5275: inline-block badges and labels, then fix padding accordingly --- less/labels-badges.less | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'less') diff --git a/less/labels-badges.less b/less/labels-badges.less index 2f15fec05..d118a0190 100644 --- a/less/labels-badges.less +++ b/less/labels-badges.less @@ -6,6 +6,8 @@ // Base classes .label, .badge { + display: inline-block; + padding: 2px 4px; font-size: @baseFontSize * .846; font-weight: bold; line-height: 14px; // ensure proper line-height if floated @@ -17,11 +19,11 @@ } // Set unique padding and border-radii .label { - padding: 1px 4px 2px; .border-radius(3px); } .badge { - padding: 1px 9px 2px; + padding-left: 9px; + padding-right: 9px; .border-radius(9px); } -- cgit v1.2.3 From f8ac403d8b9fde348fe333903a62d644ce795826 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 1 Oct 2012 13:08:21 -0700 Subject: fixes #5123: scope table grid classes to td and th elements only, plus drop columns 13-24 --- less/tables.less | 39 ++++++++++++++------------------------- 1 file changed, 14 insertions(+), 25 deletions(-) (limited to 'less') diff --git a/less/tables.less b/less/tables.less index e5b3f3979..f676abed7 100644 --- a/less/tables.less +++ b/less/tables.less @@ -180,31 +180,20 @@ table [class*=span], } // Change the column widths to account for td/th padding -.table { - .span1 { .tableColumns(1); } - .span2 { .tableColumns(2); } - .span3 { .tableColumns(3); } - .span4 { .tableColumns(4); } - .span5 { .tableColumns(5); } - .span6 { .tableColumns(6); } - .span7 { .tableColumns(7); } - .span8 { .tableColumns(8); } - .span9 { .tableColumns(9); } - .span10 { .tableColumns(10); } - .span11 { .tableColumns(11); } - .span12 { .tableColumns(12); } - .span13 { .tableColumns(13); } - .span14 { .tableColumns(14); } - .span15 { .tableColumns(15); } - .span16 { .tableColumns(16); } - .span17 { .tableColumns(17); } - .span18 { .tableColumns(18); } - .span19 { .tableColumns(19); } - .span20 { .tableColumns(20); } - .span21 { .tableColumns(21); } - .span22 { .tableColumns(22); } - .span23 { .tableColumns(23); } - .span24 { .tableColumns(24); } +.table td, +.table th { + &.span1 { .tableColumns(1); } + &.span2 { .tableColumns(2); } + &.span3 { .tableColumns(3); } + &.span4 { .tableColumns(4); } + &.span5 { .tableColumns(5); } + &.span6 { .tableColumns(6); } + &.span7 { .tableColumns(7); } + &.span8 { .tableColumns(8); } + &.span9 { .tableColumns(9); } + &.span10 { .tableColumns(10); } + &.span11 { .tableColumns(11); } + &.span12 { .tableColumns(12); } } -- cgit v1.2.3 From d36e37214b718ed27a49f49ac4c6e72f373cbd0c Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 1 Oct 2012 15:26:17 -0700 Subject: fixes #5319: add backface-visibility for webkit skewing --- less/mixins.less | 1 + 1 file changed, 1 insertion(+) (limited to 'less') diff --git a/less/mixins.less b/less/mixins.less index 1466696bc..98aa2b8a5 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -297,6 +297,7 @@ -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twitter/bootstrap/issues/4885 -o-transform: skew(@x, @y); transform: skew(@x, @y); + -webkit-backface-visibility: hidden; // See https://github.com/twitter/bootstrap/issues/5319 } .translate3d(@x, @y, @z) { -webkit-transform: translate3d(@x, @y, @z); -- cgit v1.2.3 From 1b814458c9476c32a92390e9e5cd989a51d04f05 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 1 Oct 2012 16:41:13 -0700 Subject: improve dropdown submenu docs; add docs for left submenu; remove all dupe css for left submenu --- less/dropdowns.less | 47 ++++++++++++++--------------------------------- 1 file changed, 14 insertions(+), 33 deletions(-) (limited to 'less') diff --git a/less/dropdowns.less b/less/dropdowns.less index 9622d2d46..5ed279167 100644 --- a/less/dropdowns.less +++ b/less/dropdowns.less @@ -206,39 +206,20 @@ border-left-color: @dropdownLinkColorHover; } -// Left-opening Sub menus -// --------------------------- -.dropdown-submenu-left { - position: relative; -} -.dropdown-submenu-left > .dropdown-menu { - top: 0; - left: -100%; - margin-top: -6px; - margin-left: -1px; - -webkit-border-radius: 6px 0px 6px 6px; - -moz-border-radius: 6px 0px 6px 6px; - border-radius: 6px 0px 6px 6px; -} -.dropdown-submenu-left:hover > .dropdown-menu { - display: block; -} - -.dropdown-submenu-left > a:before { - display: block; - content: " "; - float: left; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; - border-width: 5px 5px 5px 0px; - border-right-color: darken(@dropdownBackground, 20%); - margin-top: 5px; - margin-left: -10px; -} -.dropdown-submenu-left:hover > a:after { - border-right-color: @dropdownLinkColorHover; +// Left aligned submenus +.dropdown-submenu.pull-left { + // Undo the float + // Yes, this is awkward since .pull-left adds a float, but it sticks to our conventions elsewhere. + float: none; + + // Positioning the submenu + > .dropdown-menu { + left: -100%; + margin-left: 10px; + -webkit-border-radius: 6px 0 6px 6px; + -moz-border-radius: 6px 0 6px 6px; + border-radius: 6px 0 6px 6px; + } } // Tweak nav headers -- cgit v1.2.3 From 7c9597f4e76d45571fab7a0e19d90b2fea8aab02 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 1 Oct 2012 23:34:03 -0700 Subject: remove double border effect: instead of inset shadow and border on fixed navbars, only border --- less/navbar.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'less') diff --git a/less/navbar.less b/less/navbar.less index 58621b473..95131ff3a 100644 --- a/less/navbar.less +++ b/less/navbar.less @@ -202,7 +202,7 @@ .navbar-fixed-top, .navbar-static-top { .navbar-inner { - .box-shadow(~"inset 0 -1px 0 rgba(0,0,0,.1), 0 1px 10px rgba(0,0,0,.1)"); + .box-shadow(~"0 1px 10px rgba(0,0,0,.1)"); } } @@ -210,7 +210,7 @@ .navbar-fixed-bottom { bottom: 0; .navbar-inner { - .box-shadow(~"inset 0 1px 0 rgba(0,0,0,.1), 0 -1px 10px rgba(0,0,0,.1)"); + .box-shadow(~"0 -1px 10px rgba(0,0,0,.1)"); } } -- cgit v1.2.3