Use form elements in checkbox and radio button groups

* Uses .btn on label elements with nested checkbox and radio controls within
* Updated examples to reflect change in HTML and CSS
* Had to add .active all buttons for proper state highlighting (mimicing the :active pseudo state)
* Still needs JavaScript plugin updated by @fat
This commit is contained in:
Mark Otto
2013-03-16 12:34:07 -07:00
parent be8f992c94
commit efbf8373a5
4 changed files with 88 additions and 26 deletions

View File

@@ -156,3 +156,10 @@
width: 1%;
}
}
// Checkbox and radio options
.btn-group[data-toggle="buttons-radio"] > .btn > input[type="radio"],
.btn-group[data-toggle="buttons-checkbox"] > .btn > input[type="checkbox"] {
display: none;
}

View File

@@ -401,7 +401,8 @@
&:hover,
&:focus,
&:active {
&:active,
&.active {
background-color: darken(@background, 5%);
border-color: darken(@border, 10%);
}
@@ -411,7 +412,8 @@
fieldset[disabled] & {
&:hover,
&:focus,
&:active {
&:active,
&.active {
background-color: @background;
border-color: @border
}