Juxt
免費訂閱
文章 · 收錄於 2022.03
MGN-BLOG-FLUID-TY
索引 · 部落格

Fluid Typography

1 分鐘閱讀

I recall making font sizes fluid and scale in ratio according to the viewport was not an easy task few years ago. Here's the formula I had bookmarked from css-tricks.com

body {
  font-size: calc([minimum size] + ([maximum size] - [minimum size]) * ((100vw - [minimum viewport width]) / ([maximum viewport width] - [minimum viewport width])));
}

Introducing clamp(), a css function that is made for exact this use case. Clamp allows you to set minimum and maximum value.

h1 {
 font-size: clamp(MIN, VAL, MAX);
}
索引 · 相關文章

延伸閱讀

文章 · 01
預覽圖
typography
Weekly Design Documentaries Free Streaming — Helvetica

Independent film director Gary Hustwit announced to offer free streaming of his past work to encourage people staying home. First title would be his typography documentary Helvetica (2007).

部落格
文章 · 02
預覽圖
documentary
Design Documentaries

Catching up with some design documentaries in the last few months during quarantine, here's my recommended list! The two-season documentary series highlight artists across various fields of design. Each episode is an in-depth look of how design is implemented around our everyday life. @abstractdesign Watch Now Discover the history and cultural impact of the famous typeface Helvetica, also known as

部落格