Space-delimiting in font-variant values: A small Practice correction
One of the best parts of our Typekit Practice lesson Caring about OpenType Features is that it dynamically generates CSS code for
font-feature-settings and even the nascent
font-variant. You can copy and paste this code directly from the lesson, or continue working with it over on CodePen.
A few weeks ago, Google engineer Dominik Röttsches sent a note to your friendly neighborhood Typekit support folks. He had been studying our Caring about OpenType Features lesson in order to improve
font-variant support in Google’s Chrome browser, and he noticed that our CSS code had a syntax error:
When I found that Chrome would always fail to interpret the font-variant-ligatures property as soon as there would be a comma, I checked the syntax a bit more closely. … font variant values should be only space separated, and there must be no commas.
So we changed code samples like this:
font-variant-ligatures: common-ligatures, contextual;
font-variant-ligatures: common-ligatures contextual;
See? No comma between the values. We’ve updated the syntax in the lesson, and also in our related help documentation. Thanks for letting us know, Dominik!
If you’re interested in reading more about the Chrome browser development process (and their support for all manner of web typography), Dominik recommends following the Blink-dev Google group on the topic.