canonical / canonical/vanilla-framework

Test vw-based root em font-size

Open
#5,510 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
983
Forks
216
Avg merge
3d 13h
Merged PRs (30d)
3

Description

In the visual design team, we've been discussing a simpler approach to responsive typography, which could do away with changing heading settings at 2 breakpoints as we currently do.

In my inbrowser experiments, defining the root font size on the html element like so:
```font-size: calc(.8rem + .2vw);``` seems to keep alignment to the baseline grid, and nicely scales all text while maintaining baseline alignment.

Wonder if we can test this in a pr? cc @jmuzina (very low priority).

![Image](https://github.com/user-attachments/assets/1d9201f8-24a1-43bf-b6d1-96704218ffe8)

Contributor guide

Open the contributing guide

Research direction

Start by locating the current heading settings and their two responsive breakpoints in the framework styles. Compare them with a root html font-size of calc(.8rem + .2vw) using the existing visual examples or browser experiments. Done means determining whether the proposed scaling preserves baseline alignment and warrants a pull request.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
design, frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.