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.

modals: Restrict dropdown and input widths in narrow screens.

Sahil Batraad19c16dca43
diff --git a/web/styles/modal.css b/web/styles/modal.css
index b2f44cdf9ae..cb5992e5cab 100644
--- a/web/styles/modal.css
+++ b/web/styles/modal.css
@@ -429,6 +429,7 @@
border: 1px solid hsl(0deg 0% 80%);
cursor: pointer;
background-color: hsl(0deg 0% 100%);
+ max-width: 100%;
&:disabled {
cursor: not-allowed;
@@ -470,6 +471,7 @@
margin-bottom: 10px;
/* subtract padding (6px each side) and border (1px each side) */
width: calc(var(--modal-input-width) - 14px);
+ max-width: calc(100% - 14px);
&:focus {
border-color: hsl(206deg 80% 62% / 80%);
diff --git a/web/styles/popovers.css b/web/styles/popovers.css
index 2f894930981..f8e64be9ece 100644
--- a/web/styles/popovers.css
+++ b/web/styles/popovers.css
@@ -607,6 +607,8 @@ ul.popover-group-menu-member-list {
/* Override default modal input width, since that overflows.
This is 185px (the default "width: unset" width) at 14px/em */
width: 13.2142em;
+ /* subtract padding (6px on left and 28px on right) and border (1px each side) */
+ max-width: calc(100% - 36px);
}
.group-search:placeholder-shown + #clear_groups_search,
@@ -905,6 +907,9 @@ ul.popover-group-menu-member-list {
box-sizing: border-box;
width: 100%;
height: auto;
+ /* Unset max-width set using modal_text_input selector as box-sizing
+ is set to border-box here and we already set width to 100%. */
+ max-width: unset;
&.empty-topic-display::placeholder {
color: inherit;
diff --git a/web/styles/settings.css b/web/styles/settings.css
index 6eb333020fa..b4381a408a0 100644
--- a/web/styles/settings.css
+++ b/web/styles/settings.css
@@ -813,6 +813,11 @@ input[type="checkbox"] {
grid-template-columns: minmax(0, 1fr) 1.4285em; /* 20px at 14px em */
align-items: center;
width: var(--modal-input-width);
+
+ .flatpickr-wrapper {
+ grid-column: datepicker-start / close-button-end;
+ grid-row: close-button;
+ }
}
.control-label-disabled {
@@ -1713,7 +1718,8 @@ label.preferences-radio-choice-label {
#edit-user-form {
.person_picker {
/* Subtract (1px border and 2px of padding) on each side */
- min-width: calc(var(--modal-input-width) - 6px);
+ width: calc(var(--modal-input-width) - 6px);
+ max-width: calc(100% - 6px);
}
& textarea {