[css-fonts-5][editorial] Add more meta text scale examples#14019
Open
davidsgrogan wants to merge 1 commit into
Open
[css-fonts-5][editorial] Add more meta text scale examples#14019davidsgrogan wants to merge 1 commit into
davidsgrogan wants to merge 1 commit into
Conversation
Member
Author
|
/cc @progers @JoshTumath |
progers
reviewed
Jun 6, 2026
| <meta name="text-scale" content="scale" /> | ||
| <style> | ||
| .h1 { | ||
| --dampen-factor: calc(0.5 + 0.5 / env(preferred-text-scale)); |
Contributor
There was a problem hiding this comment.
What do you think of adding a comment and a little content, then showing an example of the content at 1.x, 2x, and 3.5x? This will encourage others to test large scales.
<meta name="viewport" content="width=device-width">
<meta name="text-scale" content="scale">
<style>
h1 {
/*
Multiply the 2em baseline by a dampening factor (between 1.0 to 0.5) to
ensure headers scale up, but without getting too large. Here are the
resulting font sizes at various text scale factors:
h1 body
1x 32px 16px
1.5x 40px 24px
2x 48px 32px
3x 64px 48px
3.5x 72px 56px
*/
--dampen-factor: calc(0.5 + 0.5 / env(preferred-text-scale));
font-size: calc(2em * var(--dampen-factor));
}
</style>
<h1>Header</h1>
This is some body text. The header grows slower than the body text.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow up to offline June 1 convo.