Skip to content

Commit

Permalink
fix: ensure [disabled] styling
Browse files Browse the repository at this point in the history
  • Loading branch information
Westbrook committed Jan 20, 2021
1 parent 57d5c14 commit 4c067eb
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/checkbox/src/checkbox.css
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,7 @@ governing permissions and limitations under the License.
:host(:empty) label {
display: none;
}

:host([disabled]) {
pointer-events: none;
}
6 changes: 6 additions & 0 deletions packages/radio/src/radio.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,9 @@ governing permissions and limitations under the License.
6px
);
}

/* End work around. */

:host([disabled]) {
pointer-events: none;
}
10 changes: 10 additions & 0 deletions packages/switch/src/switch.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ governing permissions and limitations under the License.
--spectrum-switch-handle-border-radius: 50%;
}

/* Not part of workaround. */

:host([disabled]) {
pointer-events: none;
}

/* Continue work around... */

:host([dir='ltr'][checked]) #input + #switch:before {
/* [dir=ltr] .spectrum-Switch-input:checked+.spectrum-Switch-switch:before */
transform: translateX(
Expand All @@ -44,3 +52,5 @@ governing permissions and limitations under the License.
)
);
}

/* End work around. */

0 comments on commit 4c067eb

Please sign in to comment.