Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
user_circles: Improve gradients in light mode and over avatars.
Karl Stolleybd94e3a93207
diff --git a/web/styles/app_variables.css b/web/styles/app_variables.cssindex 7a1c5e1a55e..cb962ba5d23 100644--- a/web/styles/app_variables.css+++ b/web/styles/app_variables.css@@ -1518,6 +1518,36 @@--color-user-circle-idle: light-dark(#f5b266, #ae640a);--color-user-circle-offline: light-dark(#c1c6d7, #454854);--color-user-circle-deactivated: hsl(0deg 0% 50%);+ --gradient-user-circle-idle: linear-gradient(+ to right,+ var(--color-user-circle-idle) 5%,+ light-dark(+ color-mix(+ in srgb,+ var(--color-user-circle-idle) 78.9%,+ transparent+ ),+ var(--color-user-circle-idle)+ )+ 25%,+ transparent 100%+ );+ /* To avoid the avatar bleeding through, we rewrite+ the gradient with an explicit background color. */+ --gradient-user-circle-idle-avatar: linear-gradient(+ to right,+ var(--color-user-circle-idle) 5%,+ light-dark(+ color-mix(+ in srgb,+ var(--color-user-circle-idle) 78.9%,+ var(--color-background)+ ),+ var(--color-user-circle-idle)+ )+ 25%,+ var(--color-background) 100%+ );--color-copy-button: light-dark(/* hsl(229deg 9% 36%) corresponds to --grey-600.We use the hsl() equivalent directly since postcss-color-mix-functiondiff --git a/web/styles/user_circles.css b/web/styles/user_circles.cssindex 6a01b2dbaee..a21de9d1d23 100644--- a/web/styles/user_circles.css+++ b/web/styles/user_circles.css@@ -3,15 +3,15 @@}.user-circle-idle {- background: linear-gradient(- to right,- var(--color-user-circle-idle) 25%,- transparent- );+ background: var(--gradient-user-circle-idle);background-clip: text;-webkit-text-fill-color: transparent;}+.with_avatar .user-circle-idle {+ background: var(--gradient-user-circle-idle-avatar);+}+.user-circle-offline {color: var(--color-user-circle-offline);}