style: Fix dropdown text alignment by reducing vertical padding.

Zulip's select widgets have a 30px height; this comes from Bootstrap
but is also generally nice for visual consistency.

In modals, we use a 15px font-size, instead of the 14px used in the
rest of the app, and in that context, the 4px vertical padding plus
30px fixed height resulted in the text not being vertically aligned.

Fix this by removing that vertical padding; all of our select elements
with these classes appear to position the text in the center of the
dropdown through other CSS mechanisms.
This commit is contained in:
Lakshay Mittal 2023-03-31 12:51:02 +05:30 committed by Tim Abbott
parent 8f4de3afc0
commit a208da9c4d
7 changed files with 7 additions and 7 deletions

View File

@ -335,7 +335,7 @@
.modal_select {
height: 30px;
width: 220px;
padding: 4px 6px;
padding: 0 6px;
color: hsl(0deg 0% 33%);
border-radius: 4px;
border: 1px solid hsl(0deg 0% 80%);

View File

@ -55,7 +55,7 @@ tr.admin td:first-child {
& select {
height: 30px;
width: 220px;
padding: 4px 6px;
padding: 0 6px;
font-size: 14px;
color: hsl(0deg 0% 33%);
border-radius: 4px;

View File

@ -374,7 +374,7 @@ input[name="licenses"] {
& select {
height: 30px;
width: 100%;
padding: 4px 6px;
padding: 0 6px;
font-size: 14px;
color: hsl(0deg 0% 33%);
border-radius: 4px;

View File

@ -46,7 +46,7 @@
& select {
height: 30px;
padding: 4px 6px;
padding: 0 6px;
width: 220px;
font-size: 14px;
color: hsl(0deg 0% 33%);

View File

@ -108,7 +108,7 @@ html {
& select {
height: 30px;
padding: 4px 6px;
padding: 0 6px;
width: 220px;
font-size: 14px;
color: hsl(0deg 0% 33%);

View File

@ -370,7 +370,7 @@ td .button {
/* list_select is similar to settings_select, but without the height styling. */
.settings_select,
.list_select {
padding: 4px 6px;
padding: 0 6px;
color: hsl(0deg 0% 33%);
border-radius: 4px;
border: 1px solid hsl(0deg 0% 80%);

View File

@ -2477,7 +2477,7 @@ select.custom-expiration-time,
select.invite-as {
width: 220px;
height: 30px;
padding: 4px 6px;
padding: 0 6px;
color: hsl(0deg 0% 33%);
border-radius: 4px;
border: 1px solid hsl(0deg 0% 80%);