From 1fd1eb9bfd854d28c0aa06e84597d6c500ac4db3 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Thu, 25 Jul 2024 09:56:26 -0700 Subject: [PATCH] Typography: Scale the font size according to screen size Use viewport width units to scale the font size between 100% and 125%. --- assets/css/010_typography.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/css/010_typography.css b/assets/css/010_typography.css index f424499..20b9459 100644 --- a/assets/css/010_typography.css +++ b/assets/css/010_typography.css @@ -25,7 +25,7 @@ --font-family-body: var(--font-family-sans); --font-family-heading: var(--font-family-monospace); - --text-base-size: 125%; + --text-base-size: clamp(100%, 3vw, 125%); --text-base: {{ $base }}{{ $unit }}; {{ range $scale -}} --text-{{ .Name }}: calc(var(--text-base) * pow({{ $factor }}, {{ .Value }}));