Comments (2)
After some testing, I'm thinking of using on this:
html { font-size: 1rem; }
@media (min-width: 37.5rem) { html { font-size: calc(0.4vw + .85rem) } }
or the equivalent in pixels:
html { font-size: 16px; }
@media (min-width: 600px) { html { font-size: calc(0.4vw + 13.6px) } }
The vw-based font-size provides a growth line with a reasonable slope related to the available viewport width -- i.e., if the font size is 16px at 600px of width, it will steadily grow until it's about 21px at 1920px (width of a 1080p screen).
The min-width rule provides constant font size of 16px as a minimum, for all viewports up to 600px, and from then the linear progression kicks in. For a smooth transition at the 600px mark, we need to shift the 0.4vw-sloped line up to pass 16px (y coord) at that width (x coord). Since the height of 0.4vw (remember, vw = x/100) is 2.4px at x=600px, we need to add 13.6px to reach 16px.
Perhaps I could set a smaller minimum, say 0.9rem.
And I wonder if we could get a smooth transition rather than a hard break. But using only elementary arithmetic operations it may become excessively convoluted.
from downstyler.
For future reference, cross-linking to another issue related to text sizing: #30
from downstyler.
Related Issues (20)
- Collect challenging pages to test against HOT 2
- Experiment: quote marks around blockquotes HOT 3
- Change bookmarklet to download the style before applying it HOT 1
- Fix selection color in Firefox
- Float images and figures with class containing "right" or "left" HOT 1
- Use ch units instead of em HOT 3
- Limit max font size (and page width) HOT 2
- Get inspiration from Tufte CSS
- Style HR
- Add styles for aside elements
- Tweak selection color for paperlike style
- Add hyphens:auto for paperlike HOT 1
- XML error at http://waldyrious.net/downstyler/ in Firefox HOT 2
- Add `img[class*="icon"][src$=".svg"]` to small images selector
- Use `:is()` or `:where()` to simplify/shorten some of the selectors
- Add dark mode
- Make tables responsive HOT 6
- Suggestion: mention that it plays nicely with Firefox's "keyword" feature? HOT 4
- Compare bookmarklet code with Waterize
- Side-by-side comparisons
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from downstyler.