Widget Text Scaling

Just a little tip I found the other day that you may or may not know about. When writing custom widgets and setting CSS text sizing, you can use “vw” to scale to a percentage of the horizontal width. There are other ones available too.

This works especially well for devices with different screen resolutions so the font/panels look the same on each. The recommendation is to specify a fixed font-size first in case devices are too old to understand. For example:

font-size: 16px; font-size: 2.5vw