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.

user_pill: Use variables for sizing and scale with font-size.

evykassirerba55ddf1d028
diff --git a/web/styles/app_variables.css b/web/styles/app_variables.css
index ae101548b6a..e974a7e1102 100644
--- a/web/styles/app_variables.css
+++ b/web/styles/app_variables.css
@@ -195,6 +195,8 @@
--search-box-height: 1.75em; /* 28px at 16px em */
}
+ --search-pill-label-min-width: 2.1429em; /* 30px at 14px/em */
+
/*
Since #navbar_alerts_wrapper can take variable height depending upon
window width / language, we sync its height in navbar_alerts.js
@@ -546,6 +548,8 @@
them, and a square aspect-ratio, even under
`box-sizing: border-box` in the area. */
--length-input-pill-image: calc(var(--height-input-pill) - 2px);
+ --length-input-pill-exit: 1.1429em; /* 16px at 14px/em */
+ --input-pill-side-padding: 0.3571em; /* 5px at 14px/em */
--vertical-spacing-input-pill: 2px;
--outer-spacing-input-pill-container: var(--vertical-spacing-input-pill);
--horizontal-spacing-input-pill: 6px;
diff --git a/web/styles/input_pill.css b/web/styles/input_pill.css
index 84128da04df..60e32e60997 100644
--- a/web/styles/input_pill.css
+++ b/web/styles/input_pill.css
@@ -55,7 +55,7 @@
/* Allow label to collapse for ellipsis effect. */
min-width: 0;
align-items: center;
- margin: 0 5px;
+ margin: 0 var(--input-pill-side-padding);
.zulip-icon-bot {
margin-left: 0.4em;
@@ -92,8 +92,8 @@
}
.exit {
- width: 16px;
- height: 16px;
+ width: var(--length-input-pill-exit);
+ height: var(--length-input-pill-exit);
display: flex;
justify-content: center;
margin-right: 2px;
diff --git a/web/styles/search.css b/web/styles/search.css
index 321ad2b1deb..39f12bf61e2 100644
--- a/web/styles/search.css
+++ b/web/styles/search.css
@@ -301,7 +301,7 @@
}
.pill-label {
- min-width: 30px;
+ min-width: var(--search-pill-label-min-width);
}
@media (width >= $md_min) {