diff options
| author | Chris Rebert <[email protected]> | 2012-12-09 23:42:05 -0800 |
|---|---|---|
| committer | Chris Rebert <[email protected]> | 2012-12-09 23:42:05 -0800 |
| commit | 3b5d4f52a3c2a11ec732fd9ca3b58e83290cd03c (patch) | |
| tree | 750a106b683f497ee7f445d2b56130973c8b7118 /less | |
| parent | bc0b94a3fdc8fe480c74f4494073e2c0addb265e (diff) | |
| download | bootstrap-3b5d4f52a3c2a11ec732fd9ca3b58e83290cd03c.tar.xz bootstrap-3b5d4f52a3c2a11ec732fd9ca3b58e83290cd03c.zip | |
fixes #5605: style as disabled all form controls & btns under a disabled fieldset
this is a resubmission of #5875, but now against branch 3.0.0-wip
does not exclude elements under a fieldset's legend
issue #6058 is a duplicate of #5605
Diffstat (limited to 'less')
| -rw-r--r-- | less/buttons.less | 17 | ||||
| -rw-r--r-- | less/forms.less | 29 | ||||
| -rw-r--r-- | less/mixins.less | 2 |
3 files changed, 29 insertions, 19 deletions
diff --git a/less/buttons.less b/less/buttons.less index 92c9477aa..4af87c579 100644 --- a/less/buttons.less +++ b/less/buttons.less @@ -48,7 +48,8 @@ // Disabled state &.disabled, - &[disabled] { + &[disabled], + fieldset[disabled] & { cursor: default; background-image: none; .opacity(65); @@ -174,7 +175,8 @@ input[type="button"] { // Make a button look and behave like a link .btn-link, .btn-link:active, -.btn-link[disabled] { +.btn-link[disabled], +fieldset[disabled] .btn-link { background-color: transparent; background-image: none; .box-shadow(none); @@ -190,7 +192,12 @@ input[type="button"] { text-decoration: underline; background-color: transparent; } -.btn-link[disabled]:hover { - color: @grayDark; - text-decoration: none; +.btn-link { + &[disabled], + fieldset[disabled] & { + &:hover { + color: @grayDark; + text-decoration: none; + } + } } diff --git a/less/forms.less b/less/forms.less index fe1bb9d40..0eca554c3 100644 --- a/less/forms.less +++ b/less/forms.less @@ -330,21 +330,24 @@ textarea[class*="span"], // -------------- // Disabled and read-only inputs -input[disabled], -select[disabled], -textarea[disabled], -input[readonly], -select[readonly], -textarea[readonly] { - cursor: not-allowed; - background-color: @input-background-disabled; +input, +select, +textarea { + &[disabled], + &[readonly], + fieldset[disabled] & { + cursor: not-allowed; + background-color: @input-background-disabled; + } } // Explicitly reset the colors here -input[type="radio"][disabled], -input[type="checkbox"][disabled], -input[type="radio"][readonly], -input[type="checkbox"][readonly] { - background-color: transparent; +input[type="radio"], +input[type="checkbox"] { + &[disabled], + &[readonly], + fieldset[disabled] & { + background-color: transparent; + } } diff --git a/less/mixins.less b/less/mixins.less index 63be2318c..5e323cc3e 100644 --- a/less/mixins.less +++ b/less/mixins.less @@ -416,7 +416,7 @@ .reset-filter(); // in these cases the gradient won't cover the background, so we override - &:hover, &:active, &.active, &.disabled, &[disabled] { + &:hover, &:active, &.active, &.disabled, &[disabled], fieldset[disabled] & { color: @text-color; background-color: @endColor; } |
