Skip to content

Commit

Permalink
fix(css): properly apply focus styles to all form elements 🍤
Browse files Browse the repository at this point in the history
  • Loading branch information
theetrain committed Aug 8, 2017
1 parent 262b9dc commit 07dcfd0
Showing 1 changed file with 22 additions and 5 deletions.
27 changes: 22 additions & 5 deletions src/scss/elements/_forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,33 @@ select {
border-color: $color-primary;
}

&:focus {
border-color: transparent;
box-shadow: 0 0 4px 1px $color-shuttle-grey;
}

@include from-breakpoint(medium) {
letter-spacing: .5px;
}
}

%input-focus-style {
border-color: transparent;
box-shadow: 0 0 4px 1px $color-shuttle-grey;
}

textarea:focus {
@extend %input-focus-style;
}

input[type='checkbox']:focus + span::before,
input[type='radio']:focus + span::before {
@extend %input-focus-style;
}

input:not([type='radio']),
input:not([type='checkbox'])
select {
&:focus {
@extend %input-focus-style;
}
}

input,
select {
&:disabled {
Expand Down

0 comments on commit 07dcfd0

Please sign in to comment.