Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

refactor: Make variable for unread counter's background colors.

Hardik Dharmani7e776b9c7624
diff --git a/web/styles/app_components.css b/web/styles/app_components.css
index e1550994655..62ca86b740f 100644
--- a/web/styles/app_components.css
+++ b/web/styles/app_components.css
@@ -623,7 +623,7 @@ div.overlay {
font-size: 12px;
font-weight: normal;
border-radius: 4px;
- background-color: hsl(105deg 2% 50%);
+ background-color: var(--color-background-unread-counter);
color: hsl(0deg 0% 100%);
}
diff --git a/web/styles/dark_theme.css b/web/styles/dark_theme.css
index dafd6695086..d3d3cd2495f 100644
--- a/web/styles/dark_theme.css
+++ b/web/styles/dark_theme.css
@@ -512,13 +512,6 @@
color: hsl(236deg 33% 90%);
}
- .unread_count,
- /* The actions_popover unread_count object has its own variable CSS,
- and thus needs to be repeated here with all three classes for precedence) */
- .actions_popover .mark_as_unread .unread_count {
- background-color: hsl(105deg 2% 50% / 50%);
- }
-
.pill-container {
border-style: solid;
border-width: 1px;
diff --git a/web/styles/popovers.css b/web/styles/popovers.css
index 3894b981027..da521f1b734 100644
--- a/web/styles/popovers.css
+++ b/web/styles/popovers.css
@@ -278,7 +278,9 @@ ul {
font-size: 11px;
font-weight: 600;
margin-right: 2px;
- background-color: hsl(200deg 100% 40%);
+ background-color: var(
+ --color-background-unread-counter-popover-menu
+ );
/* Override random undesired bootstrap style */
text-shadow: none;
/* Not center aligned but looks better. */
diff --git a/web/styles/zulip.css b/web/styles/zulip.css
index f6489603850..a1b95ce6f61 100644
--- a/web/styles/zulip.css
+++ b/web/styles/zulip.css
@@ -189,6 +189,8 @@ body {
--color-search-shadow-wide: hsl(0deg 0% 0% / 25%);
--color-search-shadow-tight: hsl(0deg 0% 0% / 10%);
--color-search-dropdown-top-border: hsla(0deg 0% 0% / 10%);
+ --color-background-unread-counter: hsl(105deg 2% 50%);
+ --color-background-unread-counter-popover-menu: hsl(200deg 100% 40%);
/* Text colors */
--color-text-default: hsl(0deg 0% 20%);
@@ -285,6 +287,8 @@ body {
--color-background-search-option-hover: hsl(0deg 0% 30%);
--color-search-box-hover-shadow: hsl(0deg 0% 0% / 30%);
--color-search-dropdown-top-border: hsla(0deg 0% 0% / 35%);
+ --color-background-unread-counter: hsl(105deg 2% 50% / 50%);
+ --color-background-unread-counter-popover-menu: hsl(105deg 2% 50% / 50%);
/* Text colors */
--color-text-default: hsl(0deg 0% 100% / 75%);