Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Consolidate outlines in the main sidebar nav (#67283)

Nemanja Glumac2c7d8835d83b
diff --git a/frontend/src/metabase/nav/containers/MainNavbar/SidebarItems/SidebarItems.styled.tsx b/frontend/src/metabase/nav/containers/MainNavbar/SidebarItems/SidebarItems.styled.tsx
index 588a22ce5d7..ed8683eb101 100644
--- a/frontend/src/metabase/nav/containers/MainNavbar/SidebarItems/SidebarItems.styled.tsx
+++ b/frontend/src/metabase/nav/containers/MainNavbar/SidebarItems/SidebarItems.styled.tsx
@@ -54,6 +54,11 @@ export const NodeRoot = styled(TreeNode.Root)<NodeRootProps>`
padding-left: ${(props) => props.depth}rem;
border-radius: 4px;
+ &:focus-within {
+ outline: 2px solid var(--mb-color-focus);
+ outline-offset: -2px;
+ }
+
${ExpandToggleButton} {
${(props) => props.isSelected && activeColorCSS}
}
@@ -106,10 +111,20 @@ export const FullWidthButton = styled.button<{ isSelected: boolean }>`
color: var(--mb-color-brand);
}
}
+
+ &:focus,
+ &:focus-visible {
+ outline: none;
+ }
`;
export const FullWidthLink = styled(Link)`
${itemContentStyle}
+
+ &:focus,
+ &:focus-visible {
+ outline: none !important;
+ }
`;
const ITEM_NAME_LENGTH_TOOLTIP_THRESHOLD = 35;