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.

dark_theme: Cleanup todo widget colors.

Sayam Samalc1e65280aad0
diff --git a/web/styles/app_variables.css b/web/styles/app_variables.css
index db3fef10841..8043fe11b68 100644
--- a/web/styles/app_variables.css
+++ b/web/styles/app_variables.css
@@ -1503,6 +1503,27 @@
hsl(185deg 40% 35%)
);
--color-poll-names: light-dark(hsl(0deg 0% 45%), hsl(236deg 15% 70%));
+ /* TODO Widget */
+ --color-border-todo-checkbox: light-dark(
+ hsl(156deg 28% 70%),
+ color-mix(in oklch, hsl(185deg 40% 45%) 70%, transparent)
+ );
+ --color-border-todo-checkbox-hover: light-dark(
+ hsl(156deg 30% 50%),
+ hsl(185deg 40% 35%)
+ );
+ --color-border-todo-checkbox-checked: light-dark(
+ hsl(156deg 41% 40%),
+ hsl(185deg 40% 45%)
+ );
+ --color-background-todo-checkbox-hover: light-dark(
+ transparent,
+ hsl(185deg 20% 20%)
+ );
+ --color-background-todo-checkbox-checked: light-dark(
+ hsl(156deg 41% 40%),
+ hsl(185deg 40% 45%)
+ );
/* KBD colors */
--color-kbd-background: light-dark(hsl(0deg 0% 98%), hsl(211deg 29% 14%));
diff --git a/web/styles/dark_theme.css b/web/styles/dark_theme.css
index b7608179710..f18a25df349 100644
--- a/web/styles/dark_theme.css
+++ b/web/styles/dark_theme.css
@@ -438,31 +438,6 @@
}
}
- /* Widgets: Todo */
- .todo-widget {
- & label.checkbox {
- & input[type="checkbox"] {
- ~ .custom-checkbox {
- border-color: hsl(185deg 40% 45%);
- opacity: 0.7;
- }
-
- &:hover ~ .custom-checkbox {
- background-color: hsl(185deg 20% 20%);
- border-color: hsl(185deg 40% 35%);
- }
-
- &:checked ~ .custom-checkbox {
- background-color: hsl(185deg 40% 45%);
- }
-
- &:focus ~ .custom-checkbox {
- outline-color: hsl(0deg 0% 100% / 0%);
- }
- }
- }
- }
-
.panel_user_list > .pill-container,
.creator_details > .display_only_pill {
&:hover {
diff --git a/web/styles/widgets.css b/web/styles/widgets.css
index c85288cd383..2f94d791c8f 100644
--- a/web/styles/widgets.css
+++ b/web/styles/widgets.css
@@ -70,7 +70,7 @@
font-weight: 300;
line-height: 0.8;
text-align: center;
- border: 2px solid hsl(156deg 28% 70%);
+ border: 2px solid var(--color-border-todo-checkbox);
border-radius: 4px;
filter: brightness(1);
@@ -83,8 +83,8 @@
background-size: 75%;
background-position: 50% 50%;
background-repeat: no-repeat;
- background-color: hsl(156deg 41% 40%);
- border: 2px solid hsl(156deg 41% 40%);
+ background-color: var(--color-background-todo-checkbox-checked);
+ border-color: var(--color-border-todo-checkbox-checked);
}
&:disabled ~ .custom-checkbox {
@@ -93,7 +93,13 @@
}
&:hover ~ .custom-checkbox {
- border-color: hsl(156deg 30% 50%);
+ border-color: var(--color-border-todo-checkbox-hover);
+ }
+
+ &:not(:checked):hover ~ .custom-checkbox {
+ /* We only change the background color on hover,
+ when the checkbox is not checked. */
+ background-color: var(--color-background-todo-checkbox-hover);
}
&:focus ~ .custom-checkbox {