W3C home > Mailing lists > Public > www-style@w3.org > October 2012

Re: [css3-fonts] @font-feature-values syntax

From: John Daggett <jdaggett@mozilla.com>
Date: Tue, 2 Oct 2012 23:49:22 -0700 (PDT)
To: www-style@w3.org
Message-ID: <760510482.1623271.1349246962591.JavaMail.root@mozilla.com>
fantasai wrote:

> Variation A is the one in the draft. It looks like this:
> 
>    @font-feature-values Mars Serif {
>      @styleset alt-g 1,
>                curly-quotes 3,
>                code 4 5;
>      @styleset dumb 25;
>      @swash    swishy 3 5;
>    }
> 
> Variation B uses a syntax similar to standard rule sets:
> 
>    @font-feature-values Mars Serif {
>      styleset { alt-g: 1;
>                 curly-quotes: 3;
>                 code: 4 5; }
>      styleset { dumb: 25; }
>      swash { swishy: 3 5; }
>    }
>
> The primary benefit of Variation A is that it's slightly more
> compact, since it doesn't use curly braces.
> 
> The primary benefit of Variation B is that the cascading behavior of
> the name bindings behaves exactly as you would expect from the
> syntax: exactly as if the feature type were an element type
> selector, and the name declarations were property declarations.

The primary motivation behind variation A is not just compactness but
having a syntax that's very distinct from normal property rules. 
Variation B looks like a bunch of property rules, authors would easily
mistake it for a set of properties (e.g. 'alt-g', 'code') that apply
to specific elements (e.g. 'styleset', 'swash').

That said, I'm not strongly opposed to B but I would like to resolve
on this and not bikeshed on this again later.

Regards,

John Daggett
Received on Wednesday, 3 October 2012 06:49:50 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:01 GMT