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: Clean up input styles in dark_theme.css.

Sayam Samala8387a6487f1
diff --git a/web/styles/app_variables.css b/web/styles/app_variables.css
index 30c106b5bc8..d85693b15f5 100644
--- a/web/styles/app_variables.css
+++ b/web/styles/app_variables.css
@@ -2743,6 +2743,20 @@
);
/* Inputs */
+ /* Legacy input colors */
+ /* TODO: Remove these variables after migrating all the inputs to use the new input colors. */
+ --color-background-legacy-input: light-dark(
+ hsl(0deg 0% 100%),
+ hsl(0deg 0% 0% / 20%)
+ );
+ --color-border-legacy-input: light-dark(
+ hsl(0deg 0% 80%),
+ hsl(0deg 0% 0% / 60%)
+ );
+ --color-border-legacy-input-focus: light-dark(
+ hsl(206deg 80% 62% / 80%),
+ hsl(0deg 0% 0% / 90%)
+ );
--color-text-input: light-dark(hsl(0deg 0% 14%), hsl(0deg 0% 95%));
/* TODO: Light mode uses browser-default white
backgrounds; we should extend the use of this
diff --git a/web/styles/dark_theme.css b/web/styles/dark_theme.css
index 98c2fad6209..8d5daa86205 100644
--- a/web/styles/dark_theme.css
+++ b/web/styles/dark_theme.css
@@ -75,22 +75,6 @@
border-color: hsl(0deg 0% 0% / 60%);
}
- input:not(.input-element) {
- &[type="text"],
- &[type="email"],
- &[type="password"],
- &[type="number"],
- &[type="url"],
- &[type="date"] {
- background-color: hsl(0deg 0% 0% / 20%);
- border-color: hsl(0deg 0% 0% / 60%);
-
- &:focus {
- border-color: hsl(0deg 0% 0% / 90%);
- }
- }
- }
-
.popover-filter-input-wrapper .popover-filter-input:focus {
background-color: hsl(225deg 6% 7%);
border: 1px solid hsl(0deg 0% 100% / 50%);
diff --git a/web/styles/zulip.css b/web/styles/zulip.css
index b2e65970f76..0574d5139f7 100644
--- a/web/styles/zulip.css
+++ b/web/styles/zulip.css
@@ -727,6 +727,12 @@ input:not(.input-element) {
&[type="color"] {
font-size: inherit;
height: 1.4em;
+ background-color: var(--color-background-legacy-input);
+ border-color: var(--color-border-legacy-input);
+
+ &:focus {
+ border-color: var(--color-border-legacy-input-focus);
+ }
}
}