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.

modal: Use em instead of rem for modal title.

Shubham Padiaf5f3f12fbb15
diff --git a/web/styles/modal.css b/web/styles/modal.css
index cfecb842ec4..7220f054a6b 100644
--- a/web/styles/modal.css
+++ b/web/styles/modal.css
@@ -32,10 +32,12 @@
.modal__header {
padding: 16px 16px 16px 24px;
display: grid;
- /* 25px at 16px/1em = 1.6667
+ /* 1.8em is the shortest round value for heading at which none of
+ the letters of the english alphabet get cut by overflow:hidden
+ at em = 20px
29px at 16px/1em = 1.8125 */
grid-template:
- "heading close-button" 1.6667em "heading ." auto / minmax(0, 1fr)
+ "heading close-button" 1.8em "heading ." auto / minmax(0, 1fr)
1.8125em;
grid-column-gap: 4px;
}
@@ -48,8 +50,10 @@
}
.modal__title {
+ grid-area: heading;
margin: 0;
- font-size: 1.375rem;
+ /* 16 / 14 * 1.375 = 1.5714, from original 1.375rem */
+ font-size: 1.5714em;
font-weight: 600;
line-height: 1.25;
overflow: hidden;
@@ -448,10 +452,6 @@
height: 32.1428em; /* 450px / 14px em */
overflow: hidden;
- .modal__title {
- font-size: 1.375em; /* Replace default rem */
- }
-
.modal__content {
flex-grow: 1;