Skip to content

Commit e8f485e

Browse files
samburgersjgthms
authored andcommitted
fieldset disabled styles (#1682)
* fieldset disabled styles * Added disabled styles to button elements included inside a disabled fieldset * Added comma, and fieldset element reset * fieldset doesn't need display block
1 parent c50cc06 commit e8f485e

File tree

4 files changed

+24
-10
lines changed

4 files changed

+24
-10
lines changed

sass/base/generic.sass

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ strong
103103

104104
// Block
105105
106+
fieldset
107+
border: none
108+
106109
pre
107110
+overflow-touch
108111
background-color: $pre-background

sass/elements/button.sass

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ $button-static-border-color: $grey-lighter !default
104104
&.is-active
105105
background-color: darken($button-text-hover-background-color, 5%)
106106
color: $button-text-hover-color
107-
&[disabled]
107+
&[disabled],
108+
fieldset[disabled] &
108109
background-color: transparent
109110
border-color: transparent
110111
box-shadow: none
@@ -131,7 +132,8 @@ $button-static-border-color: $grey-lighter !default
131132
background-color: darken($color, 5%)
132133
border-color: transparent
133134
color: $color-invert
134-
&[disabled]
135+
&[disabled],
136+
fieldset[disabled] &
135137
background-color: $color
136138
border-color: transparent
137139
box-shadow: none
@@ -140,7 +142,8 @@ $button-static-border-color: $grey-lighter !default
140142
color: $color
141143
&:hover
142144
background-color: darken($color-invert, 5%)
143-
&[disabled]
145+
&[disabled],
146+
fieldset[disabled] &
144147
background-color: $color-invert
145148
border-color: transparent
146149
box-shadow: none
@@ -160,7 +163,8 @@ $button-static-border-color: $grey-lighter !default
160163
&.is-loading
161164
&::after
162165
border-color: transparent transparent $color $color !important
163-
&[disabled]
166+
&[disabled],
167+
fieldset[disabled] &
164168
background-color: transparent
165169
border-color: $color
166170
box-shadow: none
@@ -173,7 +177,8 @@ $button-static-border-color: $grey-lighter !default
173177
&:focus
174178
background-color: $color-invert
175179
color: $color
176-
&[disabled]
180+
&[disabled],
181+
fieldset[disabled] &
177182
background-color: transparent
178183
border-color: $color-invert
179184
box-shadow: none
@@ -186,7 +191,8 @@ $button-static-border-color: $grey-lighter !default
186191
&.is-large
187192
+button-large
188193
// Modifiers
189-
&[disabled]
194+
&[disabled],
195+
fieldset[disabled] &
190196
background-color: $button-disabled-background-color
191197
border-color: $button-disabled-border-color
192198
box-shadow: $button-disabled-shadow

sass/elements/form.sass

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ $label-weight: $weight-bold !default
4343

4444
$help-size: $size-small !default
4545

46+
4647
=input
4748
@extend %control
4849
background-color: $input-background-color
@@ -59,7 +60,8 @@ $help-size: $size-small !default
5960
&.is-active
6061
border-color: $input-focus-border-color
6162
box-shadow: $input-focus-box-shadow-size $input-focus-box-shadow-color
62-
&[disabled]
63+
&[disabled],
64+
fieldset[disabled] &
6365
background-color: $input-disabled-background-color
6466
border-color: $input-disabled-border-color
6567
box-shadow: none
@@ -137,7 +139,8 @@ $help-size: $size-small !default
137139
cursor: pointer
138140
&:hover
139141
color: $input-hover-color
140-
&[disabled]
142+
&[disabled],
143+
fieldset[disabled] &
141144
color: $input-disabled-color
142145
cursor: not-allowed
143146

@@ -171,7 +174,8 @@ $help-size: $size-small !default
171174
outline: none
172175
&::-ms-expand
173176
display: none
174-
&[disabled]:hover
177+
&[disabled]:hover,
178+
fieldset[disabled] &:hover
175179
border-color: $input-disabled-border-color
176180
&:not([multiple])
177181
padding-right: 2.5em

sass/utilities/controls.sass

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ $control-padding-horizontal: calc(0.625em - #{$control-border-width}) !default
3333
&:active,
3434
&.is-active
3535
outline: none
36-
&[disabled]
36+
&[disabled],
37+
fieldset[disabled] &
3738
cursor: not-allowed
3839

3940
%control

0 commit comments

Comments
 (0)