ithaka / pharos

JSTOR's design system
https://pharos.jstor.org
MIT License
113 stars 15 forks source link

Typography: Consider making responsive typography inherent to Pharos #263

Open daneah opened 2 years ago

daneah commented 2 years ago

The problem

In recent work that has required responding to different screen widths with different font sizes for headings to avoid squashing text and pushing content down the screen, we've swapped in headings with a smaller preset at smaller screen sizes.

This is a common need, and one that we should consider building into our typography system itself.

The solution

As an example, a heading with preset="7" should be its current size on large screens, but get smaller automatically on smaller screens—without the developer needing to do this manually. This will ensure consistency across usages for which breakpoints produce which smaller text, which may be desirable.

Alternatives considered

Additional information

elisa-vargas commented 1 year ago

@david-corneail Here is the discussion regarding responsive typography.

daneah commented 8 months ago

https://www.smashingmagazine.com/2023/11/addressing-accessibility-concerns-fluid-type/