Skip to content

Commit

Permalink
Fix broken NavBarButton styles (#668)
Browse files Browse the repository at this point in the history
Fixed broken NavBarButton and NavBarUserButton styles
  • Loading branch information
esepato authored Nov 10, 2023
1 parent 04fb992 commit fa9aadc
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 68 deletions.
67 changes: 23 additions & 44 deletions packages/panels/src/components/nav-bar/NavBarButton.module.css
Original file line number Diff line number Diff line change
@@ -1,50 +1,29 @@
.navBarButton {
/* Theme vars */
--swui-nav-bar-button-text-color: var(--lhds-color-blue-600);
--swui-nav-bar-button-background-color: transparent;
--swui-nav-bar-button-background-color-hover: var(--lhds-color-ui-100);
--swui-nav-bar-button-background-color-focus: var(--lhds-color-ui-200);
--swui-nav-bar-button-background-color-active: var(--lhds-color-ui-200);
--swui-nav-bar-button-background-color-selected: var(--lhds-color-blue-200);
--swui-nav-bar-button-background-color-selected-hover: var(
--lhds-color-blue-100
);
--swui-nav-bar-button-background-color-selected-focus: var(
--lhds-color-blue-300
);
--swui-nav-bar-button-background-color-selected-active: var(
--lhds-color-blue-200
);
&:hover {
background: var(--lhds-color-ui-100);
}

&:focus-visible {
background: var(--lhds-color-ui-200);
}

/* Flatbutton overrrides */
--swui-flat-button-text-color: var(--swui-nav-bar-button-text-color);
--swui-flat-button-icon-color: var(--swui-nav-bar-button-text-color);
--swui-flat-button-text-color-active: var(--swui-nav-bar-button-text-color);
--swui-flat-button-background-color: var(
--swui-nav-bar-button-background-color
);
--swui-flat-button-background-color-hover: var(
--swui-nav-bar-button-background-color-hover
);
--swui-flat-button-background-color-focus: var(
--swui-nav-bar-button-background-color-focus
);
--swui-flat-button-background-color-active: var(
--swui-nav-bar-button-background-color-active
);
&:active {
background: var(--lhds-color-ui-200);
}

&.selected {
--swui-flat-button-background-color: var(
--swui-nav-bar-button-background-color-selected
);
--swui-flat-button-background-color-hover: var(
--swui-nav-bar-button-background-color-selected-hover
);
--swui-flat-button-background-color-focus: var(
--swui-nav-bar-button-background-color-selected-focus
);
--swui-flat-button-background-color-active: var(
--swui-nav-bar-button-background-color-selected-active
);
background: var(--lhds-color-blue-200);

&:hover {
background: var(--lhds-color-blue-100);
}

&:focus-visible {
background: var(--lhds-color-blue-300);
}

&:active {
background: var(--lhds-color-blue-200);
}
}
}
34 changes: 10 additions & 24 deletions packages/panels/src/components/nav-bar/NavBarUserButton.module.css
Original file line number Diff line number Diff line change
@@ -1,27 +1,13 @@
.navBarUserButton {
/* Theme vars */
--swui-nav-bar-user-button-text-color: var(--lhds-color-blue-600);
--swui-nav-bar-user-button-background-color: var(--lhds-color-ui-50);
--swui-nav-bar-user-button-background-color-hover: var(--lhds-color-ui-100);
--swui-nav-bar-user-button-background-color-focus: var(--lhds-color-ui-100);
--swui-nav-bar-user-button-background-color-active: var(--lhds-color-ui-200);
&:hover {
background: var(--lhds-color-ui-100);
}

/* FlatButton overrides */
--swui-flat-button-text-color: var(--swui-nav-bar-user-button-text-color);
--swui-flat-button-icon-color: var(--swui-nav-bar-user-button-text-color);
--swui-flat-button-text-color-active: var(
--swui-nav-bar-user-button-text-color
);
--swui-flat-button-background-color: var(
--swui-nav-bar-user-button-background-color
);
--swui-flat-button-background-color-hover: var(
--swui-nav-bar-user-button-background-color-hover
);
--swui-flat-button-background-color-focus: var(
--swui-nav-bar-user-button-background-color-focus
);
--swui-flat-button-background-color-active: var(
--swui-nav-bar-user-button-background-color-active
);
&:focus-visible {
background: var(--lhds-color-ui-200);
}

&:active {
background: var(--lhds-color-ui-200);
}
}

0 comments on commit fa9aadc

Please sign in to comment.