Skip to content

Commit

Permalink
fix(project): focus state on focus-visible
Browse files Browse the repository at this point in the history
  • Loading branch information
royschut committed Jun 24, 2021
1 parent 94912ac commit d6eb8c3
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions src/components/Button/Button.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@ $large-button-height: 40px;
cursor: pointer;
transition: background-color 0.1s ease, transform 0.1s ease;

@media (hover: hover) and (pointer: fine) {
&:hover,
&:focus {
transform: scale(1.1);
}
&:focus:not(:focus-visible):not(:hover) {
transform: scale(1);
}
&:focus-visible {
transform: scale(1.1);
}
}

&.large {
height: $large-button-height;
}
Expand All @@ -42,7 +55,7 @@ $large-button-height: 40px;
border: 1px solid rgba(255, 255, 255, 0.3);

&.active,
&:focus {
&:focus-visible {
color: var(--highlight-contrast-color, white);
background-color: var(--highlight-color, black);
border-color: var(--highlight-color);
Expand All @@ -53,13 +66,12 @@ $large-button-height: 40px;
background: none;
opacity: 0.7;

&.active {
&.active,
&:focus {
opacity: 1;
}

&:hover {
background: theme.$btn-default-bg;
transform: scale(1.1);
opacity: 1;
}
}
Expand All @@ -76,11 +88,6 @@ $large-button-height: 40px;
width: 18px;
height: 18px;
}

&:hover,
&:focus {
transform: scale(1.1);
}
}

.startIcon {
Expand All @@ -90,7 +97,6 @@ $large-button-height: 40px;
margin-right: 11px;

> svg {

width: 20px;
height: 20px;
fill: currentColor;
Expand Down

0 comments on commit d6eb8c3

Please sign in to comment.