Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
feat(switch): add focus styles
Browse files Browse the repository at this point in the history
  • Loading branch information
ajoslin committed Aug 28, 2014
1 parent 7841d67 commit 8878ca7
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/components/switch/_switch.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
material-switch {
display: block;
position: relative;
height: $baseline-grid * 4;
height: $baseline-grid * 3;
margin: $baseline-grid;

*{
outline: none !important;
}
@include flex-display();
@include flex-align-items(center);

.material-switch-bar {
position: absolute;
Expand Down Expand Up @@ -34,6 +34,9 @@ material-switch {
@include transform-translate3d($switch-width - 16,0,0);
}

&:focus .material-label {
border: 1px dotted black;
}
.material-label {
margin-left: $baseline-grid * 7;
}
Expand Down

1 comment on commit 8878ca7

@marcysutton
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ajoslin great job on this. It is super accessible! My only issue I see is that the aria-label value isn't being computed in the element inspector: aria-label="Switch 1: {{ data.cb1 }}".

Is there a design style for disabled switches?

Please sign in to comment.