4 ms·
You may want to consider CSS breakpoints. They'll do that automatically without the page refresh, assuming the content layout is done using CSS already. A rou
by eric-hu 11y ago
You may want to consider CSS breakpoints. They'll do that automatically without the page refresh, assuming the content layout is done using CSS already.
A rough design pattern I've seen is
Desktop resolutions: use layout in terms percent. For instance: left side of text begins at 50% of image width.
Tablet and mobile resolutions: fixed layouts for each resolution supported.
If you're doing the polygon containment using javascript, I imagine implementing such behavior might get really complex.
- Jack000 11y agocould do with some CSS media queries. Right now I'm using a javascript calculation for font size to avoid the discrete steps in CSS breakpoints. I figured you don't see anything without javascript anyways so might as well go all the way. My philosophy for mobile resolutions is to just deliver the desktop experience. The text will be tiny yes, but you can just pinch to zoom. Sites that lock down the zoom kind of annoy me personally so that's why I did it that way. The second theme does have media queries for mobile sizes though, since it doesn't rely on the text being in a particular spot to be readable.