W3C home > Mailing lists > Public > www-style@w3.org > February 2010

Re: [CSS3] @font vs @background

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Sat, 06 Feb 2010 23:02:52 -0800
Message-ID: <4B6E659C.1070700@terrainformatica.com>
To: www-style <www-style@w3.org>
CC: Sylvain Galineau <sylvaing@microsoft.com>
Sylvain Galineau wrote:
>> From: Andrew Fedoniouk [mailto:news@terrainformatica.com]
>> Sent: Friday, February 05, 2010 9:16 PM
>> To: Sylvain Galineau
>> Cc: www-style
>> Subject: Re: [CSS3] @font vs @background
>> When you see a bug what kind of evidence/metrics you need?
>> Number of WTFs per minute coming from parser designers, JS and CSS
>> authors or what?
> Well, if there is a parsing bug, how has this been implemented by Mozilla, WebKit and now
> Opera ? Did they get it wrong ? Second, when it comes to CSS3 Fonts, I will certainly argue 
> that space vs. slash has been and will likely remain the least frustrating thing on authors' mind 
> when it comes to WTFs per minute. For quite some time :) That doesn't make it right, of course,
> but syntax is not as pressing a problem when interoperable support for the feature is as unevenly 
> distributed as it has been, for many years.

"Parsing bug?" Where this comes from?
It seems that we are speaking in different languages. Could you read my 
original message again?

>> It *is* a bug. As any bug it could be fixed or left as it is - declared
>> as such a feature. It is up to us - to the personal flexibility
>> of "engineering conscience". Sorry for the pathetic tone but I really
>> do not understand what you are trying to say.
> Well, the feeling is fairly mutual. I honestly don't understand why I should care. Maybe if you
> proposed a solution it would help clarify the actual issue and potential consequences. Thanks.

Ok, let me try to explain why one should care about CSS grammar in general.

Grammar of all properties in CSS 2.1. obey this simple set of rules:

	: <VALUE>
	| <VALUE> "/" <VALUE>



         : NUMBER S*
         | PERCENTAGE S*
         | LENGTH S*
         | EMS S*
         | EXS S*
         | ANGLE S*
         | TIME S*
         | STRING S*
         | IDENT S* | URI S* | hexcolor | function

         : <NAME> ':' <VALUE_LIST> ';'
         | <NAME> ':' <VALUE_LIST> <IMPORTANT> ';'

Couple of modules in CSS3 have introduced different grammar rules for
some properties. In particular grammar of multi-background declarations
is different from what CSS 2.1 uses. The sad thing is that CSS3 
introduces new comma operator that has completely different meaning from 
the one used in CSS21. And the worst thing is that these two different 
comma operators are used in common grammar space and at the same time 
and reuse the same character ',' in both cases.

This means that changes in CSS3 make in principle impossible
to parse CSS into AST or the like anymore.

In its turn this creates problems for future language extensions.
Making modern CSS preprocessors will be almost impossible with CSS3.

I honestly believe that such critical piece of Web technologies as CSS
should not be based on such "woodoo grammar".

Andrew Fedoniouk.

Received on Sunday, 7 February 2010 07:03:07 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:42 UTC