Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

font-variant: small-caps; shows different font sizes using Chrome or Firefox

font-variant: small-caps;
font-size: 12px;

Firefox:

  • Capital letters: 12px
  • Lowercase letters: 10px

Chrome:

  • Capital letters: 12px
  • Lowercase letters: 8px

How to harmonize that without using JavaScript?

like image 894
Marin Avatar asked Sep 28 '11 20:09

Marin


1 Answers

Webkit browsers display small-caps smaller than other browsers so.. You can use CSS media queries to easily sniff out webkit browsers like Chrome and Safari. Try something like this:

@media screen and (-webkit-min-device-pixel-ratio:0) {
.some-element-using-small-caps {
    font-size: .85em 
 }
}
like image 157
Alfonse Pinto Avatar answered Nov 07 '22 00:11

Alfonse Pinto