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.

css: Explicitly set placeholder text style.

Wesley Aptekar-Cassels8bc0c14e81bd
diff --git a/static/styles/app_components.css b/static/styles/app_components.css
index 90a254ea462..27cea005c38 100644
--- a/static/styles/app_components.css
+++ b/static/styles/app_components.css
@@ -48,6 +48,26 @@
visibility: hidden;
}
+/*
+Consistent placeholder styling, introduced to allow us to style the
+Reply box like a placeholder. Chrome uses color to set placeholder,
+while Firefox uses opacity, so we need to set both properties to avoid
+mixed styling.
+
+While we usually prefer opacity for text color in Zulip, there's some
+evidence Edge may have bugs in its handling of placeholder opacity
+CSS: https://github.com/necolas/normalize.css/issues/741
+*/
+.placeholder {
+ color: hsl(0, 0%, 45%);
+ opacity: 1;
+}
+
+textarea::placeholder,
+input::placeholder {
+ @extend .placeholder;
+}
+
.new-style {
/* -- base button styling -- */
.button {
diff --git a/static/styles/night_mode.css b/static/styles/night_mode.css
index fb459c7dfee..4f63e4344d3 100644
--- a/static/styles/night_mode.css
+++ b/static/styles/night_mode.css
@@ -2,6 +2,16 @@ body.night-mode {
background-color: hsl(212, 28%, 18%);
color: hsl(236, 33%, 90%);
+ .placeholder {
+ color: hsl(0, 0%, 55%);
+ opacity: 1;
+ }
+
+ textarea::placeholder,
+ input::placeholder {
+ @extend .placeholder;
+ }
+
a:hover {
color: hsl(200, 79%, 66%);
}