3 ms·
:lang() CSS Pseudo-Class
- divbzero 6y agoA pain point that I’ve encountered repeatedly but observed consciously for the first time today: The natural comfortable font size can vary for different languages. Hence, a font size of say 14px that works just fine for English could make you squint when reading Chinese. A solution for this is to add something like the following to your CSS stylesheet: :lang(en) { font-size: 14px; } :lang(zh) { font-size: 18px; }