You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#CSS
body {
font-size: 16px; /* Set an initial base font size */
}
/* Define media queries for different screen sizes / @media (max-width: 480px) {
body {
font-size: 14px; / Adjust the font size for smaller screens */
}
}
@media (min-width: 1200px) {
body {
font-size: 18px; /* Adjust the font size for larger screens */
}
}
#JS
<script>
// Detect changes in window size
window.addEventListener('resize', function() {
// Set a minimum and maximum font size
var fontSize = Math.max(14, Math.min(18, window.innerWidth / 100));
document.body.style.fontSize = fontSize + 'px';
});
</script>
How to setup a minimum and maximun size automatic zoom for entire app?
On mobile view of an app, the fonts are so small. I need an automatic zoom that affect all pages without user especific action.
Obviously the fonts can't be reduced or be augmented automatically without limits.
The text was updated successfully, but these errors were encountered: