Re: [css-fonts] Simplify the syntax definitions of @font-face and @font-feature-values

Tab Atkins wrote:

> The two at-rules in the Fonts spec can be specified in a much
> simpler and easier-to-read manner, now that I've defined rules for
> rule grammars.

I think what you've omitted here is that based on the new Syntax spec,
these rules could be simplified.  I'd really rather not do that at
this stage, since it means a dependency on the Syntax spec which is
unstable.  Elika posted similar comments to the list [1].

I definitely agree that it would be nice to get rid of the parser
gobbledygook from out specs (e.g. "F f|\\0{0,4}(46|66)(\r\n|[ \t\r\n\f])?")
but until Syntax is stable and there is consensus around whatever
changes it entails, I think we need to wait for higher levels for
these sorts of changes.

I also think if you toss the grammar bits in the @font-feature-values
rule case you have to add more description to specify what's valid in
a <declaration-list>. The grammar serves as a much more precise
description I think.

> The grammar for @font-face is:
> 
> @font-face { <declaration-list> }
> 
> The valid declarations inside a @font-face rule are the descriptors
> defined in this specification to apply to @font-face.

How does this avoid the fact that with !important has no role within
@font-face rules?  That's the reason the spec currently defines
<descriptor-declaration>.  In the context of descriptors it just
becomes a term that invalidates the declaration?

> The grammar for @font-feature-values is:
> 
> @font-feature-values <'font-family'># { <rule-list> }
> 
> The valid rules inside a @font-feature-values are <font-feature-rule>s:
> 
> <font-feature-rule> = [@stylistic | @styleset | ...] { <declaration-list> }
> 
> The declarations inside a <font-feature-rule> are descriptors.  Any
> descriptor name is valid.

Revision 2:

> > @font-feature-values <'font-family'># { <rule-list> }
> 
> Sorry, mistake from an earlier edit.  I meant:
> 
> @font-feature-values <'font-family'> { <rule-list> }

No, this doesn't work because generics can't be included and those
would be included in <'font-family'>.

Regards,

John Daggett

[1] http://lists.w3.org/Archives/Public/www-style/2013May/0450.html

Received on Friday, 24 May 2013 03:24:10 UTC