Setting up Typography and Rems and ems
body {
font-size: 10px;
}
a {
font-size: 2rem; (20px = 2x10px)
}
using 2rem for example as a padding will then be 20xp (ie 2x10px;)
font-size: clamp(1px, 0.65vw, 8px)
em's are based ont he font size of the current element.
h1: `
font-size: 32px;
font-size: 2rem;
font-weight: 700;
@media (min-width: 40.0625em) {
font-size: 48px;
font-size: 3rem;
}
`,
h2: `
font-size: 24px;
font-size: 1.5rem;
font-weight: 700;
@media (min-width: 40.0625em) {
font-size: 36px;
font-size: 2.25rem;
}
`,
h3: `
font-size: 18px;
font-size: 1.125rem;
font-weight: 700;
@media (min-width: 40.0625em) {
font-size: 24px;
font-size: 1.5rem;
}
`,
h4: `
font-size: 16px;
font-size: 1rem;
font-weight: 700;
@media (min-width: 40.0625em) {
font-size: 19px;
font-size: 1.1875rem;
}
`
fecd2fec-11e3-4882-8b43-0d2a7f347630
Created on: 28th October, 2022
Last updated: 28th October, 2022
Tagged With: