aboutsummaryrefslogtreecommitdiff
path: root/less/button-groups.less
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2014-03-09 22:01:38 -0700
committerMark Otto <[email protected]>2014-03-09 22:01:38 -0700
commitccb17f110de8e90773a6ebfda9e35306d625dc78 (patch)
treead1bc7e6bc41eb9805b6a2531c5c37df7a92cb87 /less/button-groups.less
parentbdd7651e323a93a4e3d207463451dd374b0a70fa (diff)
parentb1f71e5292017aca978fabb74d256989e1eeea07 (diff)
downloadbootstrap-ccb17f110de8e90773a6ebfda9e35306d625dc78.tar.xz
bootstrap-ccb17f110de8e90773a6ebfda9e35306d625dc78.zip
Merge branch 'master' into fix-8869
Diffstat (limited to 'less/button-groups.less')
-rw-r--r--less/button-groups.less12
1 files changed, 11 insertions, 1 deletions
diff --git a/less/button-groups.less b/less/button-groups.less
index 27eb796b8..ff95b0474 100644
--- a/less/button-groups.less
+++ b/less/button-groups.less
@@ -220,7 +220,17 @@
// 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.
+// This way, we ensure a DOM element is visible to position the popover from.
+//
+// See https://github.com/twbs/bootstrap/pull/12794 for more.
+
[data-toggle="buttons"] > .btn > input[type="radio"],
[data-toggle="buttons"] > .btn > input[type="checkbox"] {
- display: none;
+ position: absolute;
+ z-index: -1;
+ opacity: 0;
}