Skip to content

Commit 88a26be

Browse files
committed
frontend: set default font-size
The last commits introduced the '62.5% Font Size Trick' which almost worked perfectly, except for components that do not set font-size at all and inherit from the base font-size of the parent. These components now render with small 10px font-size instead of 16px. Fixed by changing the app style (most outer parent class) to 1.6rem which equals to 16px, so all components that do not define font-size inherit 16px.
1 parent d9da08d commit 88a26be

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

frontends/web/src/style/layout.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
.app {
5757
display: flex;
5858
flex: 1 1 auto;
59+
font-size: var(--size-root);
5960
min-height: 100vh;
6061
/* mobile viewport bug fix */
6162
min-height: -webkit-fill-available;

frontends/web/src/style/variables.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
--color-error-border: rgba(227, 6, 19, .33);
4949

5050
/* font sizes */
51+
--size-root: 1.6rem; /* 16px base for body */
5152
--size-extra-large: 3.5rem;
5253
--size-large: 3.2rem;
5354
--size-large-mobile: 2.2rem;

0 commit comments

Comments
 (0)