Skip to content

Commit

Permalink
Merge pull request #635 from JonathanDeLaCruzEncora/feat/unify-focus-…
Browse files Browse the repository at this point in the history
…ring

💄 Unify focus ring color with brand theme
  • Loading branch information
MH4GF authored Feb 10, 2025
2 parents 3f564f5 + c5f0d44 commit f7c727b
Show file tree
Hide file tree
Showing 17 changed files with 108 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@
var(--default-timing-function);
}

.iconWrapper:focus-visible {
outline: 1px solid var(--primary-color);
}

.iconWrapper:hover {
background-color: var(--pane-background-active);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ export const AppBar: FC = () => {
<TooltipProvider>
<TooltipRoot>
<TooltipTrigger asChild>
<a href="https://liambx.com" target="_blank" rel="noreferrer">
<a
href="https://liambx.com"
target="_blank"
rel="noreferrer"
className={styles.iconWrapper}
>
<LiamLogoMark className={styles.logo} />
</a>
</TooltipTrigger>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
var(--default-timing-function);
}

.iconWrapper:focus-visible {
outline: 1px solid var(--primary-color);
}

.iconWrapper:hover {
background-color: var(--pane-background-active);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
var(--default-timing-function);
}

.iconWrapper:focus-visible {
outline: 1px solid var(--primary-color);
}

.iconWrapper:hover {
background-color: var(--pane-background-active);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@
display: grid;
align-items: center;
justify-content: center;
padding: var(--spacing-2);

padding: var(--spacing-1);
margin: 0 var(--spacing-2);
border-radius: var(--border-radius-base);
&:hover .icon {
color: var(--global-foreground);
}
}

.wrapper:focus-visible {
outline: 1px solid var(--primary-color);
}

.icon {
width: 1.25rem;
height: 1.25rem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
var(--default-timing-function);
}

.iconWrapper:focus-visible {
outline: 1px solid var(--primary-color);
}

.iconWrapper:hover {
background-color: var(--pane-background-active);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@
cursor: pointer;
}

.header:focus-visible {
outline: 1px solid var(--primary-color);
}

.header:focus-visible {
outline: 1px solid var(--primary-color);
}

@media screen and (max-width: 767px) {
.header {
position: sticky;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
color: var(--overlay-70);
}

.header:focus-visible {
outline: 1px solid var(--primary-color);
}

.iconTitleContainer {
display: grid;
grid-auto-flow: column;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
padding: var(--spacing-2, 8px) var(--spacing-1, 4px);
align-items: center;
gap: var(--spacing-2, 8px);

border-radius: var(--border-radius-base);
color: var(--global-foreground, #fff);
font-size: var(--font-size-2, 11px);
}

.menuButton:focus-visible {
outline: 1px solid var(--primary-color);
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@
gap: var(--spacing-2, 8px);
color: var(--global-foreground, #fff);
font-size: var(--font-size-2, 11px);
border-radius: var(--border-radius-base);
}

.menuButton:focus-visible {
outline: 1px solid var(--primary-color);
}

.showMode {
Expand All @@ -64,11 +69,15 @@
padding: var(--spacing-1, 4px) var(--spacing-2, 8px);
align-items: center;
gap: var(--spacing-1half, 6px);

border-radius: var(--border-radius-base);
color: var(--button-secondary-foreground, #fff);
font-size: var(--font-size-3, 12px);
}

.showModeMenuButton:focus-visible {
outline: 1px solid var(--primary-color);
}

.cheveron {
display: flex;
width: 12px;
Expand All @@ -94,3 +103,7 @@
color: var(--button-secondary-foreground, #fff);
font-size: var(--font-size-3, 12px);
}

.closeButton:focus-visible {
outline: 1px solid var(--primary-color);
}
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,14 @@ export const OpenedMobileToolbar: FC<Props> = ({

<div className={styles.showMode}>
<div className={styles.text}>show</div>
<button type="button" onClick={toggleShowModeMenu}>
<div className={styles.showModeMenuButton}>
{showModeLabel}
<div className={styles.cheveron}>
<ChevronDown color="var(--global-foreground, #fff)" />
</div>
<button
type="button"
onClick={toggleShowModeMenu}
className={styles.showModeMenuButton}
>
{showModeLabel}
<div className={styles.cheveron}>
<ChevronDown color="var(--global-foreground, #fff)" />
</div>
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
align-items: center;
gap: var(--spacing-1, 4px);
align-self: stretch;
border-radius: var(--border-radius-base);
}

.backButton:focus-visible {
outline: 1px solid var(--primary-color);
}

.cheveron {
Expand Down Expand Up @@ -44,3 +49,7 @@
color: var(--button-secondary-foreground, #fff);
font-size: var(--font-size-3, 12px);
}

.closeButton:focus-visible {
outline: 1px solid var(--primary-color);
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ export const ShowModeMenu: FC<Props> = ({
}) => {
return (
<div className={styles.wrapper}>
<button type="button" onClick={toggleShowModeMenu}>
<div className={styles.backButton}>
<div className={styles.cheveron}>
<ChevronLeft size={12} color="var(--global-foreground, #fff)" />
</div>
<div className={styles.text}>show</div>
<button
type="button"
onClick={toggleShowModeMenu}
className={styles.backButton}
>
<div className={styles.cheveron}>
<ChevronLeft size={12} color="var(--global-foreground, #fff)" />
</div>
<div className={styles.text}>show</div>
</button>

<hr className={styles.divider} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
padding: var(--spacing-2, 8px) var(--spacing-1, 4px);
align-items: center;
gap: var(--spacing-2, 8px);

border-radius: var(--border-radius-base);
color: var(--global-foreground, #fff);
font-size: var(--font-size-2, 11px);
}

.menuButton:focus-visible {
outline: 1px solid var(--primary-color);
}
4 changes: 4 additions & 0 deletions frontend/packages/ui/src/components/Button/Button.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
color: var(--button-primary-foreground);
}

.wrapper:focus-visible {
outline: 1px solid var(--button-primary);
}

.icon {
display: flex;
place-content: center;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
}
}

.iconWrapper:focus-visible {
outline: 1px solid var(--primary-color);
}

.icon {
display: inline-flex;
align-items: center;
Expand Down
10 changes: 10 additions & 0 deletions frontend/packages/ui/src/components/Sidebar/Sidebar.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,21 @@
background: var(--pane-background-hover);
}

.sidebarMenuButton:focus-visible {
outline: 1px solid var(--primary-color);
}

.sidebarMenuAction {
position: absolute;
top: 0;
bottom: 0;
right: var(--spacing-5);
border-radius: var(--border-radius-base);
padding: 0 var(--spacing-1, 4px);
}

.sidebarMenuAction:focus-visible {
outline: 1px solid var(--primary-color);
}

.sidebarMenuAction.showOnHover {
Expand Down

0 comments on commit f7c727b

Please sign in to comment.