Use viewport unit to scale base font size

Use rems for font sizes and margin/padding
This commit is contained in:
2019-01-11 15:46:00 +00:00
parent af55b90f0d
commit 4bc196ad7b
13 changed files with 87 additions and 58 deletions

View File

@@ -1,5 +1,18 @@
html {
box-sizing: border-box;
line-height: 1.5;
}
@media screen and (min-width: 50rem) {
html {
font-size: 2vw;
}
}
@media screen and (min-width: 62.5rem) {
html {
font-size: 1.25rem;
}
}
body {
@@ -7,8 +20,6 @@ body {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23e0e0e0' fill-opacity='0.55' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E");
color: var(--color-near-black);
font-family: var(--body-font-family);
font-size: 16px;
line-height: 1.5;
margin: 0;
}
@@ -25,6 +36,8 @@ h1,
h2,
h3,
h4,
h5,
h6,
figure,
table,
p,