Skip to content

Commit

Permalink
Use line-height: normal by default (#26635)
Browse files Browse the repository at this point in the history
Fix #26537 again because 1.15 is too small for some fonts.
  • Loading branch information
wxiaoguang authored Aug 22, 2023
1 parent 75689b8 commit 8f2e287
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions web_src/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
--font-weight-semibold: 600;
--font-weight-bold: 700;
/* line-height: use the default value as "modules/normalize.css" */
--line-height-default: 1.15;
--line-height-default: normal;
/* backgrounds */
--checkbox-mask-checked: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="-1 -1 18 18" width="16" height="16"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg>');
--checkbox-mask-indeterminate: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M2 7.75A.75.75 0 012.75 7h10a.75.75 0 010 1.5h-10A.75.75 0 012 7.75z"></path></svg>');
Expand Down Expand Up @@ -521,8 +521,6 @@ a.label,
color: var(--color-text);
user-select: auto;
line-height: var(--line-height-default); /* fomantic uses "1" which causes overflow problems because "1" doesn't consider the descent part */
padding-top: 11px; /* counteract line-height change */
padding-bottom: 11px; /* counteract line-height change */
}

.ui.menu .item > .svg {
Expand Down Expand Up @@ -669,8 +667,6 @@ a.label,
.ui.secondary.menu .item {
margin-left: 0;
margin-right: 0;
padding-top: 10px; /* counteract line-height change */
padding-bottom: 10px; /* counteract line-height change */
}

.ui.secondary.menu .dropdown.item:hover,
Expand Down
2 changes: 1 addition & 1 deletion web_src/css/modules/normalize.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Use a better box model (opinionated).
}

html {
line-height: 1.15; /* 1. Correct the line height in all browsers. */
line-height: normal; /* 1. (not following the "modern-normalize") Do not change the browser's default line-height, the default value is font-dependent and roughly 1.2 */
-webkit-text-size-adjust: 100%; /* 2. Prevent adjustments of font size after orientation changes in iOS. */
}

Expand Down

0 comments on commit 8f2e287

Please sign in to comment.