Skip to content

Commit

Permalink
fix: added missing select disabled styles (#360)
Browse files Browse the repository at this point in the history
  • Loading branch information
mfranzke authored Mar 8, 2023
1 parent 06b5e1d commit 71fb84e
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
2 changes: 1 addition & 1 deletion source/_patterns/01-elements/select/select-variations.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<dl>
{{#each variations}}
<dt>{{variant}}:</dt>
<dd>{{> elements-select }}</dd>
<dd>{{> elements-select disabled=../disabled }}</dd>
{{/each }}
</dl>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"variations": [
{
"variant": "semitransparent",
"id": "select05",
"label": "Devices"
},
{
"variant": "white",
"id": "select06",
"label": "Devices"
},
{
"variant": "solid",
"id": "select07",
"label": "Devices"
},
{
"variant": "outline",
"id": "select08",
"label": "Devices"
}
],
"disabled": true
}
10 changes: 10 additions & 0 deletions source/_patterns/01-elements/select/select.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@
}
}

// TODO: Evaluate whether those could get moved to ../_form-elements.scss
&:disabled,
fieldset:disabled & {
&,
& + .elm-label {
// Decided against cursor: not-allowed, compare to e.g. https://phabricator.wikimedia.org/T121960
opacity: 0.4;
}
}

// ### Style variations
&[data-variant="semitransparent"] {
@extend %form-element-semitransparent;
Expand Down

0 comments on commit 71fb84e

Please sign in to comment.