diff options
Diffstat (limited to '')
-rw-r--r-- | assets/css/bootstrap-3.3.2/button-groups.less (renamed from assets/css/lib/bootstrap/_button-groups.scss) | 71 |
1 files changed, 37 insertions, 34 deletions
diff --git a/assets/css/lib/bootstrap/_button-groups.scss b/assets/css/bootstrap-3.3.2/button-groups.less index 63ccd92..13c1800 100644 --- a/assets/css/lib/bootstrap/_button-groups.scss +++ b/assets/css/bootstrap-3.3.2/button-groups.less @@ -18,10 +18,6 @@ &.active { z-index: 2; } - &:focus { - // Remove focus outline when dropdown JS adds it after closing the menu - outline: 0; - } } } @@ -38,7 +34,7 @@ // Optional: Group multiple button groups together for a toolbar .btn-toolbar { margin-left: -5px; // Offset the first child's margin - @include clearfix(); + &:extend(.clearfix all); .btn-group, .input-group { @@ -59,13 +55,13 @@ .btn-group > .btn:first-child { margin-left: 0; &:not(:last-child):not(.dropdown-toggle) { - @include border-right-radius(0); + .border-right-radius(0); } } // Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it .btn-group > .btn:last-child:not(:first-child), .btn-group > .dropdown-toggle:not(:first-child) { - @include border-left-radius(0); + .border-left-radius(0); } // Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group) @@ -75,14 +71,14 @@ .btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { border-radius: 0; } -.btn-group > .btn-group:first-child { +.btn-group > .btn-group:first-child:not(:last-child) { > .btn:last-child, > .dropdown-toggle { - @include border-right-radius(0); + .border-right-radius(0); } } -.btn-group > .btn-group:last-child > .btn:first-child { - @include border-left-radius(0); +.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child { + .border-left-radius(0); } // On active and open, don't show outline @@ -96,9 +92,9 @@ // // Remix the default button sizing classes into new ones for easier manipulation. -.btn-group-xs > .btn { @extend .btn-xs; } -.btn-group-sm > .btn { @extend .btn-sm; } -.btn-group-lg > .btn { @extend .btn-lg; } +.btn-group-xs > .btn { &:extend(.btn-xs); } +.btn-group-sm > .btn { &:extend(.btn-sm); } +.btn-group-lg > .btn { &:extend(.btn-lg); } // Split button dropdowns @@ -117,11 +113,11 @@ // The clickable button for toggling the menu // Remove the gradient and set the same inset shadow as the :active state .btn-group.open .dropdown-toggle { - @include box-shadow(inset 0 3px 5px rgba(0,0,0,.125)); + .box-shadow(inset 0 3px 5px rgba(0,0,0,.125)); // Show no shadow for `.btn-link` since it has no other button styles. &.btn-link { - @include box-shadow(none); + .box-shadow(none); } } @@ -132,12 +128,12 @@ } // Carets in other button sizes .btn-lg .caret { - border-width: $caret-width-large $caret-width-large 0; + border-width: @caret-width-large @caret-width-large 0; border-bottom-width: 0; } // Upside down carets for .dropup .dropup .btn-lg .caret { - border-width: 0 $caret-width-large $caret-width-large; + border-width: 0 @caret-width-large @caret-width-large; } @@ -156,7 +152,7 @@ // Clear floats so dropdown menus can be properly placed > .btn-group { - @include clearfix(); + &:extend(.clearfix all); > .btn { float: none; } @@ -176,12 +172,12 @@ border-radius: 0; } &:first-child:not(:last-child) { - border-top-right-radius: $border-radius-base; - @include border-bottom-radius(0); + border-top-right-radius: @border-radius-base; + .border-bottom-radius(0); } &:last-child:not(:first-child) { - border-bottom-left-radius: $border-radius-base; - @include border-top-radius(0); + border-bottom-left-radius: @border-radius-base; + .border-top-radius(0); } } .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { @@ -190,15 +186,14 @@ .btn-group-vertical > .btn-group:first-child:not(:last-child) { > .btn:last-child, > .dropdown-toggle { - @include border-bottom-radius(0); + .border-bottom-radius(0); } } .btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child { - @include border-top-radius(0); + .border-top-radius(0); } - // Justified button groups // ---------------------- @@ -226,15 +221,23 @@ // Checkbox and radio options // // In order to support the browser's form validation feedback, powered by the -// `required` attribute, we have to "hide" the inputs via `opacity`. We cannot -// use `display: none;` or `visibility: hidden;` as that also hides the popover. +// `required` attribute, we have to "hide" the inputs via `clip`. We cannot use +// `display: none;` or `visibility: hidden;` as that also hides the popover. +// Simply visually hiding the inputs via `opacity` would leave them clickable in +// certain cases which is prevented by using `clip` and `pointer-events`. // This way, we ensure a DOM element is visible to position the popover from. // -// See https://github.com/twbs/bootstrap/pull/12794 for more. +// See https://github.com/twbs/bootstrap/pull/12794 and +// https://github.com/twbs/bootstrap/pull/14559 for more information. -[data-toggle="buttons"] > .btn > input[type="radio"], -[data-toggle="buttons"] > .btn > input[type="checkbox"] { - position: absolute; - z-index: -1; - @include opacity(0); +[data-toggle="buttons"] { + > .btn, + > .btn-group > .btn { + input[type="radio"], + input[type="checkbox"] { + position: absolute; + clip: rect(0,0,0,0); + pointer-events: none; + } + } } |