Skip to content

Commit

Permalink
fieldset disabled styles (#1682)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
samburgers authored and jgthms committed Oct 31, 2018
1 parent c50cc06 commit e8f485e
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 10 deletions.
3 changes: 3 additions & 0 deletions sass/base/generic.sass
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ strong

// Block
fieldset
border: none

pre
+overflow-touch
background-color: $pre-background
Expand Down
18 changes: 12 additions & 6 deletions sass/elements/button.sass
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ $button-static-border-color: $grey-lighter !default
&.is-active
background-color: darken($button-text-hover-background-color, 5%)
color: $button-text-hover-color
&[disabled]
&[disabled],
fieldset[disabled] &
background-color: transparent
border-color: transparent
box-shadow: none
Expand All @@ -131,7 +132,8 @@ $button-static-border-color: $grey-lighter !default
background-color: darken($color, 5%)
border-color: transparent
color: $color-invert
&[disabled]
&[disabled],
fieldset[disabled] &
background-color: $color
border-color: transparent
box-shadow: none
Expand All @@ -140,7 +142,8 @@ $button-static-border-color: $grey-lighter !default
color: $color
&:hover
background-color: darken($color-invert, 5%)
&[disabled]
&[disabled],
fieldset[disabled] &
background-color: $color-invert
border-color: transparent
box-shadow: none
Expand All @@ -160,7 +163,8 @@ $button-static-border-color: $grey-lighter !default
&.is-loading
&::after
border-color: transparent transparent $color $color !important
&[disabled]
&[disabled],
fieldset[disabled] &
background-color: transparent
border-color: $color
box-shadow: none
Expand All @@ -173,7 +177,8 @@ $button-static-border-color: $grey-lighter !default
&:focus
background-color: $color-invert
color: $color
&[disabled]
&[disabled],
fieldset[disabled] &
background-color: transparent
border-color: $color-invert
box-shadow: none
Expand All @@ -186,7 +191,8 @@ $button-static-border-color: $grey-lighter !default
&.is-large
+button-large
// Modifiers
&[disabled]
&[disabled],
fieldset[disabled] &
background-color: $button-disabled-background-color
border-color: $button-disabled-border-color
box-shadow: $button-disabled-shadow
Expand Down
10 changes: 7 additions & 3 deletions sass/elements/form.sass
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ $label-weight: $weight-bold !default

$help-size: $size-small !default


=input
@extend %control
background-color: $input-background-color
Expand All @@ -59,7 +60,8 @@ $help-size: $size-small !default
&.is-active
border-color: $input-focus-border-color
box-shadow: $input-focus-box-shadow-size $input-focus-box-shadow-color
&[disabled]
&[disabled],
fieldset[disabled] &
background-color: $input-disabled-background-color
border-color: $input-disabled-border-color
box-shadow: none
Expand Down Expand Up @@ -137,7 +139,8 @@ $help-size: $size-small !default
cursor: pointer
&:hover
color: $input-hover-color
&[disabled]
&[disabled],
fieldset[disabled] &
color: $input-disabled-color
cursor: not-allowed

Expand Down Expand Up @@ -171,7 +174,8 @@ $help-size: $size-small !default
outline: none
&::-ms-expand
display: none
&[disabled]:hover
&[disabled]:hover,
fieldset[disabled] &:hover
border-color: $input-disabled-border-color
&:not([multiple])
padding-right: 2.5em
Expand Down
3 changes: 2 additions & 1 deletion sass/utilities/controls.sass
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ $control-padding-horizontal: calc(0.625em - #{$control-border-width}) !default
&:active,
&.is-active
outline: none
&[disabled]
&[disabled],
fieldset[disabled] &
cursor: not-allowed

%control
Expand Down

0 comments on commit e8f485e

Please sign in to comment.