Elastic Headers and Text
Tue Mar 22 2022 16:24:34 GMT+0000 (Coordinated Universal Time)
Saved by
@svmarinez
@media screen and (min-width: 320px) {
h1 {
font-size: calc(32px + 6 * ((100vw - 320px) / 680));
}
h2 {
font-size: calc(24px + 6 * ((100vw - 320px) / 680));
}
h3 {
font-size: calc(18.72px + 6 *((100vw - 320px) / 680))
}
h4 {
font-size: calc(16px + 6 *((100vw - 320px) / 680))
}
h5 {
font-size: calc(13.28px + 6 *((100vw - 320px) / 680))
}
h6 {
font-size: calc(12px + 6 *((100vw - 320px) / 680))
}
html {
font-size: calc(16px + 6 * ((100vw - 320px) / 680));
}
}
content_copyCOPY
https://css-tricks.com/snippets/css/fluid-typography/
Comments