Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
sidebars: Add active and hover sidebar-row styles.
Karl Stolley8c54c1df3e47
diff --git a/web/styles/app_variables.css b/web/styles/app_variables.cssindex 8259b3a4458..869df80e0ee 100644--- a/web/styles/app_variables.css+++ b/web/styles/app_variables.css@@ -556,15 +556,14 @@--color-text-sidebar-row: hsl(0deg 0% 20%);--color-text-active-narrow-filter: hsl(0deg 0% 15%);--color-background-active-narrow-filter: hsl(0deg 0% 100%);- --color-background-hover-narrow-filter: hsl(120deg 12.3% 71.4% / 38%);+ --color-background-hover-narrow-filter: hsl(0deg 0% 97%);/* We mix an opaque version with the background forreplicating the color on .sidebar-topic-check, whichwill mask a portion of the topic-grouping bracket. */- --color-background-opaque-hover-narrow-filter: color-mix(- in srgb,- hsl(120deg 12.3% 71.4%) 38%,- hsl(0deg 0% 94%)+ --color-background-opaque-hover-narrow-filter: var(+ --color-background-hover-narrow-filter);+ --color-shadow-sidebar-row-hover: hsl(0deg 0% 0% / 30%);--color-navbar-bottom-border: hsl(0deg 0% 80%);--color-unread-marker: hsl(217deg 64% 59%);--color-masked-unread-marker: hsl(0deg 0% 80%);@@ -611,7 +610,9 @@--color-background-tab-picker-tab-option-active: hsl(0deg 0% 100% / 35%);--color-background-popover: hsl(0deg 0% 100%);--color-background-alert-word: hsl(18deg 100% 84%);- --color-buddy-list-highlighted-user: hsl(120deg 12.3% 71.4% / 38%);+ --color-buddy-list-highlighted-user: var(+ --color-background-hover-narrow-filter+ );--color-border-sidebar: hsl(0deg 0% 87%);--color-text-sidebar-base: hsl(0deg 0% 0%);--color-border-sidebar-subheader: hsl(0deg 0% 0% / 15%);@@ -1020,15 +1021,22 @@hsl(0deg 0% 100%) 8%,hsl(0deg 0% 11%));- --color-background-hover-narrow-filter: hsl(136deg 25% 73% / 20%);+ --color-background-hover-narrow-filter: hsl(0deg 0% 97% / 8%);/* We mix an opaque version with the background forreplicating the color on .sidebar-topic-check, whichwill mask a portion of the topic-grouping bracket. */--color-background-opaque-hover-narrow-filter: color-mix(in srgb,- hsl(136deg 25% 73%) 20%,+ hsl(0deg 0% 97%) 8%,hsl(0deg 0% 11%));+ --color-background-opaque-hover-active-narrow-filter: color-mix(+ in srgb,+ hsl(0deg 0% 97%) 8%,+ hsl(0deg 0% 97%) 8%,+ hsl(0deg 0% 11%)+ );+ --color-shadow-sidebar-row-hover: hsl(0deg 0% 100% / 30%);--color-navbar-bottom-border: hsl(0deg 0% 0% / 60%);--color-unread-marker: hsl(217deg 64% 59%);--color-masked-unread-marker: hsl(0deg 0% 30%);@@ -1076,7 +1084,9 @@--color-background-tab-picker-tab-option-hover: hsl(0deg 0% 100% / 5%);--color-background-tab-picker-tab-option-active: hsl(0deg 0% 100% / 3%);--color-background-alert-word: hsl(22deg 70% 35%);- --color-buddy-list-highlighted-user: hsl(136deg 25% 73% / 20%);+ --color-buddy-list-highlighted-user: var(+ --color-background-hover-narrow-filter+ );--color-border-sidebar: hsl(0deg 0% 0% / 20%);--color-text-sidebar-base: hsl(0deg 0% 100%);--color-border-sidebar-subheader: hsl(0deg 0% 100% / 15%);diff --git a/web/styles/left_sidebar.css b/web/styles/left_sidebar.cssindex b38f0beb35b..bf5156c2730 100644--- a/web/styles/left_sidebar.css+++ b/web/styles/left_sidebar.css@@ -223,7 +223,7 @@font-weight: 400;margin-left: 0;margin-bottom: 0;- line-height: var(--line-height-sidebar-row);+ line-height: var(--line-height-sidebar-row-prominent);& li.dm-list-item {& a {@@ -303,10 +303,16 @@}}-:not(.active-sub-filter) {- &.top_left_row:hover,- &.bottom_left_row:hover {+.top_left_row,+.bottom_left_row {+ /* Ensure a border radius on any interactive+ state that might show a highlight. */+ border-radius: 4px;++ &:hover,+ &:has(.left_sidebar_menu_icon_visible) {background-color: var(--color-background-hover-narrow-filter);+ box-shadow: inset 0 0 0 1px var(--color-shadow-sidebar-row-hover);.sidebar-topic-check {background-color: var(@@ -314,13 +320,13 @@);}}-}-.top_left_row,-.bottom_left_row {- /* Ensure a border radius on any interactive- state that might show a highlight. */- border-radius: 4px;+ &.active-filter,+ &.active-sub-filter {+ &:has(.left_sidebar_menu_icon_visible) {+ background-color: var(--color-background-active-narrow-filter);+ }+ }}#stream_filters .narrow-filter.highlighted_stream {@@ -381,7 +387,7 @@ ul.filters {&:hover {/* Push back against a:hover color in dark_theme.css */- color: inherit !important;+ color: var(--color-text-sidebar-row) !important;}&:focus {@@ -491,6 +497,17 @@ li.active-sub-filter {color: var(--color-text-active-narrow-filter);background-color: var(--color-background-active-narrow-filter);+ &:hover {+ background-color: var(--color-background-active-narrow-filter);++ .sidebar-topic-check {+ /* This variable is only set and used in dark mode. */+ background-color: var(+ --color-background-opaque-hover-active-narrow-filter+ );+ }+ }+.sidebar-topic-check {background-color: var(--color-background-active-narrow-filter);}@@ -505,6 +522,10 @@ li.active-sub-filter {> .bottom_left_row {background-color: var(--color-background-active-narrow-filter);border-radius: 4px;++ &:hover {+ background-color: var(--color-background-hover-narrow-filter);+ }}}@@ -1065,7 +1086,6 @@ li.top_left_scheduled_messages {bracket's bottom line. Its value must less thanthe z-index set on the #streams_header selector. */z-index: 1;- background-color: var(--color-background);}.stream-markers-and-controls,diff --git a/web/styles/right_sidebar.css b/web/styles/right_sidebar.cssindex 69e593f8faa..06956cc5a7e 100644--- a/web/styles/right_sidebar.css+++ b/web/styles/right_sidebar.css@@ -106,6 +106,7 @@ $user_status_emoji_width: 24px;&:hover,&.highlighted_user {background-color: var(--color-buddy-list-highlighted-user);+ box-shadow: inset 0 0 0 1px var(--color-shadow-sidebar-row-hover);}}@@ -135,6 +136,8 @@ $user_status_emoji_width: 24px;text-align: left;&:hover {+ /* Prevent hover styles set on other rows. */+ box-shadow: none;background-color: inherit;}}@@ -146,6 +149,11 @@ $user_status_emoji_width: 24px;color: var(--color-text-url);&:hover {+ /* Prevent hover styles set on other rows until+ the right sidebar matches the action-heading typography+ of the left sidebar. */+ box-shadow: none;+ background-color: inherit;color: var(--color-text-url-hover);}}