Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Responsive typography
Search
Gunnar Bittersmann
July 08, 2019
Programming
120
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Responsive typography
Gunnar Bittersmann
July 08, 2019
More Decks by Gunnar Bittersmann
See All by Gunnar Bittersmann
Responsive typography 2
gunnarbittersmann
0
180
Go home, Prettifier, you’re drunk!!
gunnarbittersmann
0
130
3 Fehler sind zu finden
gunnarbittersmann
0
210
TIL that the future :has already begun
gunnarbittersmann
0
150
TIL how to clear floats
gunnarbittersmann
0
160
TIL about showModal (from small things big things one day come)
gunnarbittersmann
0
150
Inclusive Design 24 2022 – Gunnar’s picks
gunnarbittersmann
0
120
The color rebeccapurple
gunnarbittersmann
0
210
Mehrsprachige Websites
gunnarbittersmann
0
140
Other Decks in Programming
See All in Programming
AIは賢い。でも実行環境は? CLIおじさんがAI時代に伝えたいこと ~ CLIおじさんがAI時代に伝えたいこと ~
curekoshimizu
1
250
市販E-Readerを乗っ取れ 〜Embedded Swiftで電子ペーパーガジェットを制御する〜
trickart
0
190
スマート反転とウェブアクセシビリティ
camiha
0
210
Vibes Containers 〜AIで変わるコンテナ設計と運用〜
tkikuc
3
550
GraphRAGのKnowledge Graphを 直接!見る/View-GraphRAG's-KnowledgeGraph-directly!
tyumugi1113
1
340
Webの地図
yosuke_furukawa
PRO
6
4.6k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
180
SREの越境 / SRE Collaboration
y0hgi
2
240
Snowflakeで業務アプリを作ろう。 Snowflakeのアプリ機能解説&実践ガイド
ayumu_yamaguchi
1
280
すこし踏み込む CancellationToken
htkym
1
500
スマートフォンでモールス信号を送受信する 〜スマートフォンのLEDとカメラで作る光通信の設計と実装〜
atsuki_seo
0
140
一人だけ、Kiroが静止する日
hideg
0
120
Featured
See All Featured
The Limits of Empathy - UXLibs8
cassininazir
1
680
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
330
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
A Tale of Four Properties
chriscoyier
163
24k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
30 Presentation Tips
portentint
PRO
1
400
The SEO identity crisis: Don't let AI make you average
varn
0
560
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
Test your architecture with Archunit
thirion
2
2.4k
Making Projects Easy
brettharned
120
6.8k
Transcript
RESPONSIVE TYPOGRAPHY
LEGIBLE READABLE
LEGIBLE 1Il Gill Sans 1Il Helvetica 1Il Franklin Gothic
FS 1Il Source Sans Pro
READABLE Schriftgröße Zeilenlänge Zeilenabstand 16px 1em 65 Zeichen/Zeile 1.5
body { font-size: 1rem } h1 { font-size: 1.625rem }
h2 { font-size: 1.375rem }
body { font-size: 1rem } h1 { font-size: 1.625rem }
h2 { font-size: 1.375rem } @media (min-width: 22.5em) { body { font-size: 1.125rem } } @media (min-width: 45em) { body { font-size: 1.25rem } }
body { font-size: 1rem } h1 { font-size: 1.625rem }
h2 { font-size: 1.375rem } @media (min-width: 22.5em) { body { font-size: 1.125rem } h1 { font-size: 1.778rem } h2 { font-size: 1.333rem } } @media (min-width: 45em) { body { font-size: 1.25rem } h1 { font-size: 1.8rem } h2 { font-size: 1.4rem } }
body { font-size: var(--medium) } h1 { font-size: var(--x-large) }
h2 { font-size: var(--large) } :root { --medium: 1rem; --large: 1.375rem; --x-large: 1.625rem; } @media (min-width: 22.5em) { :root { --medium: 1.125rem; --large: 1.778rem; --x-large: 1.333rem; } } @media (min-width: 45em) { :root { --medium: 1.25rem; --large: 1.8rem; --x-large: 1.43rem; } }
body { font-size: 1.25rem; font-size: var(--medium); } h1 { font-size:
1.8rem; font-size: var(--x-large); } h2 { font-size: 1.4rem; font-size: var(--large); } :root { --medium: 1rem; --large: 1.375rem; --x-large: 1.625rem; } @media (min-width: 22.5em) { :root { --medium: 1.125rem; --large: 1.778rem; --x-large: 1.333rem; } } @media (min-width: 45em) { :root { --medium: 1.25rem; --large: 1.8rem; --x-large: 1.43rem; } }
$type-config = { breakpoint: 0 font-sizes: { x-small: 12 1.3
button: 13 1 small: 14 1.3 medium: 16 1.4 large: 22 1.2 x-large: 26 1.2 } },{ breakpoint: 360 font-sizes: { x-small: 12 1.3 button: 14 1 small: 16 1.3 medium: 18 1.5 large: 24 1.2 x-large: 32 1.2 } },{ breakpoint: 720 font-sizes: { x-small: 12 1.3 button: 14 1 small: 16 1.3
$fallback-font-sizes = $type-config[2][font-sizes] $px-factor = 16 set-font-size($font-size, importance = false)
font-size: ($fallback-font-sizes[$font-size][0]/$px-factor)rem (importance is important ? !important :) font-size: s('var(--font-size-%s, %s)', $font-size, ($fallback-font-sizes[$font-size][0]/ $px-factor)rem) (importance is important ? !important :) set-line-height($font-size, importance = false) line-height: $fallback-font-sizes[$font-size][1] (importance is important ? !important :) line-height: s('var(--line-height-%s, %s)', $font-size, $fallback-font-sizes[$font-size][1]) (importance is important ? !important :) set-font-size-line-height($font-size, importance = false) set-font-size($font-size, importance) set-line-height($font-size, importance) :root for $screen-size in $type-config @media (min-width: ($screen-size[breakpoint]/$px-factor)em) for $key, $value in $screen-size[font-sizes] --font-size-{$key}: ($value[0]/$px-factor)rem --line-height-{$key}: $value[1]
body set-font-size-line-height(medium) h1 set-font-size-line-height(x-large) h2 set-font-size-line-height(large)
FLUID TYPOGRAPHY
calc((18 - 16)/640 * 100vw + (16 - (18 -
16)/2) * 1rem/16) f(x) = m x + n f(x) = m (x − 320) + 16 m = = = Δy Δx 18 − 16 960 − 320 18 − 16 640 18 − 16 640 f(x) = (x − 320) + 16 18 − 16 640 18 − 16 2 = x + 16 − Schriftgröße: 16px bei 320px Breite, 18px bei 960px Breite
body { font-size: calc((18 - 16)/640 * 100vw + (16
- (18 - 16)/2) * 1rem/16); } Überschrift: 26px bei 320px Breite, 36px bei 960px Breite h1 { font-size: calc((36 - 26)/640 * 100vw + (26 - (36 - 26)/2) * 1rem/16); } Schriftgröße: 16px bei 320px Breite, 18px bei 960px Breite
body { --font-size-320: 16; --font-size-960: 18; } h1 { --font-size-320:
26; --font-size-960: 36; } body, h1 { font-size: calc((var(--font-size-960) - var(--font-size-320))/640 * 100vw + (var(--font-size-320) - (var(--font-size-960) - var(--font-size-320))/2) * 1rem/16); }