In HTML/CSS, is there really no way to increase the font size (to a legible size) on phones or small devices only?
@cancel You can use media queries to do this, based on the device's height or width! :3
@somnius this also affects regular desktop web browsers...
Using em/rem units might actually help for you here, since they're related to the default text size set by the body element (for rem) or by the parent element (for em). If that doesn't work, there's also vh or vw units that you can look into! Those are related to the viewport height or width respectively, which is more closely related to device size.
@cancel @neauoire Not exactly. EM units change size based on the set parent element, whereas REM units will change size based on the size set by the font-size set on the HTML or BODY tag of a page! You can do some fancy stuff with this to change the font size on a webpage with these rules in mind. https://developer.mozilla.org/en-US/docs/Learn/CSS/Introduction_to_CSS/Values_and_units
Unfortunately, however, I don't know of a way to set a maximum font size, which may be what you're looking for.
@cancel @neauoire Oh, hm, I think I see what you're getting at. That's not how I'd be using media queries! I'd always be using widths with pixel units for media queries and adjusting font sizes with em/rem units.
That way, I can adjust the base "body" font size based on the device pixel width (if I was using REMs) or I could adjust the font-size right on the parent based on the device's pixel width.
i want to make that specified size a legible size on phones, instead of having it appear tiny. (specifying "9pt" still gives you a tiny font on phones, not 9 points...)
@cancel That's true—but I think that works out, in the end. If someone has a browser that they've only set to a quarter of their screen's width, making the website's typeface more legible or bigger somehow is completely usable.
@somnius no, that's the opposite of what should happen. if someone makes their desktop browser window tiny, making the font bigger is terrible. it's one of the reasons i hate the "modern" web. every god damn web page demands i keep the browser window huge in order to not have it switch to clown-sized text.
Revel in the marvels of the universe. We are a collective of forward-thinking individuals who strive to better ourselves and our surroundings through constant creation. We express ourselves through music, art, games, and writing. We also put great value in play. A warm welcome to any like-minded people who feel these ideals resonate with them. Check out our Patreon to see our donations.