waldyrious / downstyler

A stylesheet and bookmarklet that trims webpage styles down to near-bare HTML.
http://waldyrious.net/downstyler
ISC License
30 stars 5 forks source link

Limit max font size (and page width) #47

Closed waldyrious closed 4 years ago

waldyrious commented 6 years ago

My personal experience is that often the font size is too big for comfortable reading, when using large screens, and end up using the browser zoom feature to reduce the font size (and consequently page width) to a comfortable size -- usually 80%. It would be nice if the style itself capped those sizes to a reasonable default. Or perhaps the growth rate could be reduced.

waldyrious commented 4 years ago

With the new min(), max() and clamp(), not only this is easier to do, but even the current implementation (from #9) becomes simpler :)

Specifically, the current implementation:

html { font-size: 16px; }
@media (min-width: 600px) { html { font-size: calc(13px + 0.5vw) } }

could become:

html { font-size: max(16px, calc(13px + 0.5vw)); }

...and if we want to introduce a maximum:

html { font-size: clamp(16px, calc(13px + 0.5vw), 20px); }
waldyrious commented 4 years ago

Fixed in #54.