4 ms·
Actually not. In the current W3C draft (http://www.w3.org/TR/2011/WD-css3-fonts-20111004/#font-feature-settings-prop http://www.w3.org/TR/2011/WD-css3-fonts-201
by zethraeus 15y ago
Actually not. In the current W3C draft (http://www.w3.org/TR/2011/WD-css3-fonts-20111004/#font-feature-settings-prop http://www.w3.org/TR/2011/WD-css3-fonts-20111004/#font-featu...) the syntax for font features is as such:
font-feature-settings: "kern" 1;
Actual implementations are currently CSS extensions as the functionality is not yet in a published spec.
Mozilla's CSS extension uses the syntax:
-moz-font-feature-settings: "kern=1";
Microsoft's CSS extension however uses the same syntax as the current W3C draft, expect with the standard browser specific prefix used before a feature makes it into the official spec.
-ms-font-feature-settings: "kern" 1;
Whether this syntax is ideal or not is still, imho, contestable. Either way it isn't Mozilla's parameter-esque style (which I agree stands very much in opposition to the usual CSS syntax style), and as long as the syntax in the draft reaches finalization, said parameter-esque syntax should go away for good.
- underwater 15y agoBoth are horrible. Mozilla's because the string is a transparent blob that's parsed separately to the rest of the CSS syntax and Microsoft's because it's dependent on ordering. I don't see why a boolean value wasn't an option; the values is either defined or it's not. Otherwise "kern(1)" would have been more consistant with other properties.