Skip to content

Commit

Permalink
Fix inset focus ring
Browse files Browse the repository at this point in the history
  • Loading branch information
connor-baer committed Nov 14, 2023
1 parent 06c031b commit 1a70b32
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions packages/circuit-ui/components/ListItem/ListItem.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ button.base:focus {
z-index: 2;
border-color: transparent;
outline: 0;
box-shadow: inset 0 0 0 4px var(--cui-border-focus);
box-shadow: inset 0 0 0 2px var(--cui-border-focus);
}

a.base:focus::-moz-focus-inner,
Expand Down Expand Up @@ -79,7 +79,7 @@ button.base:active {
left: calc(-1 * var(--cui-border-width-mega));
z-index: 1;
pointer-events: none;
content: '';
content: "";
border: var(--cui-border-width-mega) solid var(--cui-border-accent);
border-radius: var(--cui-border-radius-mega);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/circuit-ui/components/Popover/Popover.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
left: 0;
display: block;
height: var(--cui-spacings-kilo);
content: '';
content: "";
background: linear-gradient(
rgb(255 255 255 / 0%),
rgb(255 255 255 / 66%),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

.base:focus {
outline: 0;
box-shadow: inset 0 0 0 4px var(--cui-border-focus);
box-shadow: inset 0 0 0 2px var(--cui-border-focus);
}

.base:focus::-moz-focus-inner {
Expand All @@ -38,18 +38,18 @@
background-color: var(--cui-bg-normal-pressed);
}

.base[aria-selected='true'] {
.base[aria-selected="true"] {
position: relative;
color: var(--cui-fg-normal);
}

.base[aria-selected='true']::after {
.base[aria-selected="true"]::after {
position: absolute;
right: 0;
bottom: 0;
left: 0;
width: 100%;
height: var(--cui-spacings-bit);
content: ' ';
content: " ";
background: var(--cui-border-accent);
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ button.hamburger {
.logo a:focus,
.logo button:focus {
outline: 0;
box-shadow: inset 0 0 0 4px var(--cui-border-focus);
box-shadow: inset 0 0 0 2px var(--cui-border-focus);
}

.logo a:focus::-moz-focus-inner,
Expand Down
22 changes: 11 additions & 11 deletions packages/circuit-ui/styles/shared.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

.list-item:focus {
outline: 0;
box-shadow: inset 0 0 0 4px var(--cui-border-focus);
box-shadow: inset 0 0 0 2px var(--cui-border-focus);
}

.list-item:focus::-moz-focus-inner {
Expand Down Expand Up @@ -78,28 +78,28 @@
background-color: var(--cui-bg-normal-disabled);
}

.navigation-item[aria-expanded='true'],
.navigation-item[aria-current='page'] {
.navigation-item[aria-expanded="true"],
.navigation-item[aria-current="page"] {
color: var(--cui-fg-accent);
background-color: var(--cui-bg-accent);
}

.navigation-item[aria-expanded='true']:hover,
.navigation-item[aria-current='page']:hover {
.navigation-item[aria-expanded="true"]:hover,
.navigation-item[aria-current="page"]:hover {
color: var(--cui-fg-accent-hovered);
background-color: var(--cui-bg-accent-hovered);
}

.navigation-item[aria-expanded='true']:active,
.navigation-item[aria-current='page']:active {
.navigation-item[aria-expanded="true"]:active,
.navigation-item[aria-current="page"]:active {
color: var(--cui-fg-accent-pressed);
background-color: var(--cui-bg-accent-pressed);
}

.navigation-item[aria-expanded='true']:disabled,
.navigation-item[aria-expanded='true'][disabled],
.navigation-item[aria-current='page']:disabled,
.navigation-item[aria-current='page'][disabled] {
.navigation-item[aria-expanded="true"]:disabled,
.navigation-item[aria-expanded="true"][disabled],
.navigation-item[aria-current="page"]:disabled,
.navigation-item[aria-current="page"][disabled] {
color: var(--cui-fg-accent-disabled);
background-color: var(--cui-bg-accent-disabled);
}
2 changes: 1 addition & 1 deletion packages/circuit-ui/styles/style-mixins.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ describe('Style helpers', () => {
"
&:focus {
outline: 0;
box-shadow: inset 0 0 0 4px var(--cui-border-focus);
box-shadow: inset 0 0 0 2px var(--cui-border-focus);
&::-moz-focus-inner {
border: 0;
Expand Down
2 changes: 1 addition & 1 deletion packages/circuit-ui/styles/style-mixins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ export function focusVisible(options?: 'inset' | ThemeArgs): SerializedStyles {
return css`
&:focus {
outline: 0;
box-shadow: inset 0 0 0 4px var(--cui-border-focus);
box-shadow: inset 0 0 0 2px var(--cui-border-focus);
&::-moz-focus-inner {
border: 0;
Expand Down

0 comments on commit 1a70b32

Please sign in to comment.