Skip to content

Commit

Permalink
Fix all focus > focus-visible
Browse files Browse the repository at this point in the history
  • Loading branch information
leanormandon committed May 31, 2024
1 parent 46203e0 commit 6b286b7
Show file tree
Hide file tree
Showing 19 changed files with 38 additions and 33 deletions.
4 changes: 4 additions & 0 deletions assets/css/mobileDrawer.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,8 @@
&-show {
@apply translate-y-0;
}

@screen md {
display: none;
}
}
2 changes: 1 addition & 1 deletion components/Atoms/Form/checkbox.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
height: 0;
width: 0;

&:focus {
&:focus-visible{
& ~ .checkmark {
outline: var(--checkbox-focus) solid 1px;
outline-offset: 1px;
Expand Down
2 changes: 1 addition & 1 deletion components/Atoms/Form/toggle.css
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
}
}
}
input:focus {
input:focus-visible{
& ~ .ToggleButton-wrapper {
outline: var(--checkbox-focus) solid 1px;
outline-offset: 1px;
Expand Down
4 changes: 2 additions & 2 deletions components/Molecules/Breadcrumb/breadcrumb.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
color: var(--grey);
}

&:focus {
&:focus-visible{
background-color: var(--theme-light);
}
}
Expand All @@ -42,7 +42,7 @@
text-decoration: none;
margin-top: rem-convert(2px);

&:focus {
&:focus-visible{
background-color: var(--grey-lightest);
border: solid 1px var(--theme-medium);
}
Expand Down
6 changes: 3 additions & 3 deletions components/Molecules/Button/button.css
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
background: var(--grey-dark);
}
}
&:focus {
&:focus-visible, &:has(:focus-visible) {
outline: var(--theme-medium) solid 2px;
}
&:disabled {
Expand All @@ -71,7 +71,7 @@
color: var(--white);
}
}
&:focus {
&:focus-visible, &:has(:focus-visible){
background: var(--white);
border: transparent solid 1px;
&:hover {
Expand Down Expand Up @@ -122,7 +122,7 @@
&:hover:not(:focus):not(:disabled) {
background: var(--error-light);
}
&:focus {
&:focus-visible, &:has(:focus-visible){
outline: var(--error-dark) solid 2px;
}
&:disabled {
Expand Down
6 changes: 3 additions & 3 deletions components/Molecules/Dropdown/dropdown.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
background-color: var(--theme-light);
}

&:focus + .Dropdown-list {
&:focus+ .Dropdown-list {
opacity: 1;
animation-name: none;
}

&:focus + .Dropdown-list .Dropdown-option {
&:focus+ .Dropdown-list .Dropdown-option {
cursor: pointer;
}
}
Expand Down Expand Up @@ -74,7 +74,7 @@
outline: none;

&:hover,
&:focus {
&:focus-visible{
background-color: var(--theme-light);
}
}
Expand Down
4 changes: 2 additions & 2 deletions components/Molecules/Fields/FieldInput/fieldInput.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
background-color: var(--theme-lightest);
}

&:focus {
&:focus-visible{
outline-offset: 2px;
outline: 1px solid var(--theme);
}
Expand Down Expand Up @@ -87,7 +87,7 @@
background-color: var(--error-lightest);
}

&:focus {
&:focus-visible{
outline: 1px solid var(--error-dark);
}
}
Expand Down
4 changes: 2 additions & 2 deletions components/Molecules/Fields/FieldNumber/fieldNumber.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
background-color: var(--theme-lightest);
}

&:focus {
&:focus-visible{
outline-offset: 2px;
outline: 1px solid var(--theme);
}
Expand All @@ -41,7 +41,7 @@
background-color: var(--error-lightest);
}

&:focus {
&:focus-visible{
outline: 1px solid var(--error-dark);
}
}
Expand Down
4 changes: 2 additions & 2 deletions components/Molecules/Fields/FieldSelect/fieldSelect.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
background-color: var(--theme-lightest);
}

&:focus {
&:focus-visible{
outline-offset: 2px;
outline: 1px solid var(--theme);
}
Expand Down Expand Up @@ -74,7 +74,7 @@
background-color: var(--error-lightest);
}

&:focus {
&:focus-visible{
outline: 1px solid var(--error-dark);
}
}
Expand Down
2 changes: 1 addition & 1 deletion components/Molecules/Filters/FilterList/filterList.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
outline: 0;
border-radius: 4px;

&:focus {
&:focus-visible{
outline: 1px solid var(--theme);
}

Expand Down
8 changes: 4 additions & 4 deletions components/Molecules/Filters/FilterSelect/filterSelect.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
outline: none;
border: 1px solid var(--grey-lighter);

&:focus + .FilterSelect-list {
&:focus-visible+ .FilterSelect-list {
opacity: 1;
animation-name: none;
}

&:focus + .FilterSelect-list .FilterSelect-option {
&:focus-visible+ .FilterSelect-list .FilterSelect-option {
cursor: pointer;
}

&:focus .FilterSelect-icon {
&:focus-visible.FilterSelect-icon {
transform: translateY(-50%) rotate(180deg);
}
}
Expand Down Expand Up @@ -85,7 +85,7 @@
outline: none;

&:hover,
&:focus {
&:focus-visible{
background-color: var(--grey-lightest);
}
}
Expand Down
3 changes: 2 additions & 1 deletion components/Molecules/HeaderButton/headerButton.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
--header-button-bg: var(--header-button-bg-hover);
}

&:focus {
&:focus-visible{
outline: none;
box-shadow: 0 0 0 1px var(--theme) inset;
}

Expand Down
2 changes: 1 addition & 1 deletion components/Molecules/Link/link.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
color: var(--grey);
}

&:focus {
&:focus-visible{
background-color: var(--grey-lightest);
}

Expand Down
2 changes: 1 addition & 1 deletion components/Molecules/Pagination/pagination.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
color: var(--grey);
}

&:focus {
&:focus-visible{
outline: var(--theme-medium) solid 2px;
}

Expand Down
2 changes: 1 addition & 1 deletion components/Molecules/SearchBar/searchBar.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
flex-grow: 1;
@apply paragraph-2;
color: var(--black);
&:focus {
&:focus-visible{
outline: none;
}
&::placeholder {
Expand Down
2 changes: 1 addition & 1 deletion components/Molecules/Shortcut/Shortcut.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
background-color: var(--grey-lightest);
}

&:focus {
&:focus-visible{
outline: var(--theme-medium) solid 1px;
border-bottom: 0;
}
Expand Down
4 changes: 2 additions & 2 deletions components/Molecules/Tab/tab.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
color: var(--white);
}

&:hover:focus {
&:hover:focus-visible{
color: var(--grey-dark);
}

Expand All @@ -32,7 +32,7 @@
outline-color: var(--grey-dark);
}

&:focus {
&:focus-visible{
outline: var(--theme-medium) solid 2px;
}

Expand Down
6 changes: 3 additions & 3 deletions components/Molecules/Tag/Tag.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
color: var(--black);
border: 0.5px solid var(--validated);

&:focus {
&:focus-visible{
border: 1px solid var(--validated);
}

Expand All @@ -43,7 +43,7 @@
color: var(--error-light);
border-color: var(--error);

&:focus {
&:focus-visible{
border: 1px solid var(--error-dark);
}
}
Expand All @@ -53,7 +53,7 @@
color: var(--theme-dark);
border-color: var(--theme);

&:focus {
&:focus-visible{
border: 1px solid var(--theme-dark);
}
}
Expand Down
4 changes: 2 additions & 2 deletions components/Organisms/ProductCard/ProductCard.css
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@
svg {
max-width: 35px;
}
&:focus {
&:focus-visible{
outline: none;
}

Expand Down Expand Up @@ -706,7 +706,7 @@
}

&:hover,
&:focus {
&:focus-visible{
.ProductCard-img {
img {
transform: scale(1.075);
Expand Down

0 comments on commit 6b286b7

Please sign in to comment.