Skip to content

Sync-in · Sovereign platform for file storage, sharing, synchronization, and collaboration.

style(frontend): adjust top menu button hover and focus styles in dark theme

johaven607d3073793a
diff --git a/frontend/src/styles/components/_theme_dark.scss b/frontend/src/styles/components/_theme_dark.scss
index 2b436e53..d16e0dc7 100755
--- a/frontend/src/styles/components/_theme_dark.scss
+++ b/frontend/src/styles/components/_theme_dark.scss
@@ -124,6 +124,9 @@
--app-action-state-bg: #{$dark-action-state-bg};
--app-action-state-color: #{$gray-lightest};
--app-menu-item-color: #{$gray-lighter};
+ --app-menu-item-hover-bg: #{semantic-dark('primary', bg)};
+ --app-menu-item-hover-border: #{semantic-dark('primary', border)};
+ --app-menu-item-hover-color: #{semantic-dark('primary', fg)};
--app-primary-action-bg: rgba(var(--bs-primary-rgb), 0.48);
--app-menu-surface-bg: #{$dark-menu-bg};
--app-menu-surface-border: #{$dark-menu-surface-border};
@@ -289,9 +292,10 @@
color: var(--app-menu-item-color);
background-color: transparent;
- &:hover {
- color: var(--app-action-state-color);
- background-color: var(--app-action-state-bg) !important;
+ &:is(:hover, :focus-visible):not(.active, .disabled, :active, :disabled) {
+ color: var(--app-menu-item-hover-color) !important;
+ background-color: var(--app-menu-item-hover-bg) !important;
+ box-shadow: inset 0 0 0 1px var(--app-menu-item-hover-border) !important;
}
}
@@ -302,7 +306,12 @@
.dropdown-item {
color: var(--app-menu-item-color);
- &:hover,
+ &:is(:hover, :focus-visible):not(.active, .disabled, :active, :disabled) {
+ color: var(--app-menu-item-hover-color) !important;
+ background-color: var(--app-menu-item-hover-bg) !important;
+ box-shadow: inset 0 0 0 1px var(--app-menu-item-hover-border) !important;
+ }
+
&.active,
&:active {
color: var(--app-action-state-color);
@@ -379,6 +388,14 @@
}
}
+ .app-top-menu.app-top-menu-tool-bar {
+ :is(.btn-default, .btn-custom):is(:hover, :focus-visible):not(:disabled) {
+ border-color: var(--app-menu-item-hover-border) !important;
+ background-color: var(--app-menu-item-hover-bg) !important;
+ color: var(--app-menu-item-hover-color) !important;
+ }
+ }
+
.app-foot-menu {
border-top: 0.5px solid $dark-border-subtle !important;
background-color: $sidebar-dark-icons-menu-bg;
@@ -554,13 +571,13 @@
color: var(--app-menu-item-color) !important;
background-color: transparent !important;
- &:focus-visible {
- color: var(--app-menu-item-color) !important;
- background-color: var(--app-action-state-bg) !important;
+ &:is(:hover, :focus-visible):not(.active, .disabled, :active, :disabled) {
+ color: var(--app-menu-item-hover-color) !important;
+ background-color: var(--app-menu-item-hover-bg) !important;
+ box-shadow: inset 0 0 0 1px var(--app-menu-item-hover-border) !important;
}
- &.active,
- &:hover {
+ &.active {
color: var(--app-action-state-color) !important;
background-color: var(--app-action-state-bg) !important;
}
diff --git a/frontend/src/styles/components/_variables.scss b/frontend/src/styles/components/_variables.scss
index c56b62b9..dbb56ce2 100644
--- a/frontend/src/styles/components/_variables.scss
+++ b/frontend/src/styles/components/_variables.scss
@@ -16,7 +16,7 @@ $content-z-index: 1000;
$app-top-menu-action-min-width: 2.1875rem;
$app-top-menu-action-min-height: 1.9375rem;
$app-top-menu-label-font-weight: 450;
-$app-top-menu-leading-content-offset: .28rem;
+$app-top-menu-leading-content-offset: .26rem;
$app-top-menu-action-active-bg-opacity: .16;
$app-top-menu-dropdown-indicator-opacity: .65;