From efbf8373a5060b2c9b4d97cdfd2c288124d339c6 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Sat, 16 Mar 2013 12:34:07 -0700 Subject: 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 --- less/button-groups.less | 7 +++++++ less/mixins.less | 6 ++++-- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'less') diff --git a/less/button-groups.less b/less/button-groups.less index ddb549e4b..8a83ab3f2 100644 --- a/less/button-groups.less +++ b/less/button-groups.less @@ -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; +} diff --git a/less/mixins.less b/less/mixins.less index 15f6275b7..482e7e76f 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -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 } -- cgit v1.2.3