W3C home > Mailing lists > Public > www-validator-css@w3.org > September 2007

RE: proposed changes to the CSS Validator architecture (as suggested by CSS WG)

From: Douglas Perreault <doug@perreault.us>
Date: Wed, 5 Sep 2007 10:11:16 -0400
To: "'CSS validator list'" <www-validator-css@w3.org>, "'CSS list'" <www-style@w3.org>
Message-ID: <002601c7efc6$a0697f60$e13c7e20$@us>

Olivier,

I may be "just an end user," but I can say that I do not feel that CSS
should be the sum of all previous specifications as the CSS working group
feels. This makes no sense to me as it would mean chaos in the end. If there
have been changes to the behavior of a property, and if the current spec is
the sum of all previous ones, which behavior applies? If I want to apply a
particular style, do I have to start looking through every spec to find out
if it exists? I should hope not.

If the CSS working group feels that each spec should encompass the previous
ones, then they should include each and every property in the new spec that
is either new to that spec or existed in the previous one. 

Based on the current design of the specs, that is what I and I am sure most
people assumed. Otherwise, why have such things as "font-family" in the CSS
2.1 spec? After all, if the specs are the sum of all previous ones, and
"font-family" was previously defined, why redefine it?

No, I think the purpose of redefining it is to ensure that people understand
it is a part of CSS 2.1. Those items that are NOT redefined, should be
considered obsolete and no longer a part of the spec. The current behavior
of the validator, in my opinion, is correct.

There is only one thing missing, though, as far as I know. The ability to
specify *which* style sheet specification one is following. I can include an
@charset rule, but there's no equivalent @spec rule that I know of. I think
the CSS working group is taking the concept of "cascading" too far when they
think that the specs should cascade themselves. Instead, add an @spec rule,
specify in EACH spec EVERY rule that is defined by that spec and we'll all
be happy. If they wish each to encompass the previous, then include all of
the previous spec within the new one. Don't go half way.

--Doug

-----Original Message-----
From: www-validator-css-request@w3.org
[mailto:www-validator-css-request@w3.org] On Behalf Of olivier Thereaux
Sent: Wednesday, September 05, 2007 7:08 AM
To: CSS validator list; CSS list
Cc: QA-dev Dev
Subject: proposed changes to the CSS Validator architecture (as suggested by
CSS WG)


Dear all,

People familiar with the CSS validator will know that it generally  
follows a per-profile behavior. That is, it will check stylesheets  
against the syntax, properties and values of a given CSS profile (e.g  
CSS1, CSS2, CSS2.1, etc), and will use a default profile (by default,  
CSS 2.1 at the tim of this mail) if no profile is given.

This has, for some time, been a point of contention, because while it  
matches some interpretations of the CSS specifications, it does not  
match the vision which the W3C CSS working group (in charge of  
defining and evolving CSS) has for CSS.

After a number of recent discussions, and thanks to the presence of a  
great couple of intern developers this summer, it should be possible  
to implement the following changes, suggested by the CSS working group.

Both of these points may be controversial, so I'll try to summarize  
them as objectively as possible.


1) There is only one CSS syntax.

Those familiar with the syntax defined in the various CSS  
specifications will know that there are some (small, but significant)  
differences between their tokenization and syntaxes. In the  
recommendation of the CSS working group, the syntax used when  
treating CSS should be one and only, and (at this point), this should  
be the syntax defined in the CSS 2.1 specification.

The CSS validator currently has different tokenization and syntax  
checking for its different profile, and on behalf of the WG, Bert  
recommended that this should be simplified to only use the latest  
syntax.

*** personal suggestion ***

If the syntax defined in CSS1 is to be obsoleted, but the rest of the  
CSS1 profile should remain in effect, I suggest following the part of  
the W3C process that allows "rescinding" of an existing RECommendation:

http://www.w3.org/2005/10/Process-20051014/tr.html#rec-rescind

At times, W3C MAY rescind an entire Recommendation, for instance when
W3C learns of significant errors in the Recommendation, when the
Recommendation becomes *outdated*, or if W3C discovers burdensome
patent claims that affect implementers
(emphasis mine)

This would, I believe, clarify the situation and avoid a case whereby  
someone using the syntax defined in a W3C recommendation (CSS1) would  
be told that the syntax used is incorrect. Such a case is IMHO not  
acceptable, and the CSS1 spec should be amended properly to avoid it.

*** end personal suggestion ***



2) CSS is the sum of its profile

What happens if one uses, in a CSS style sheet, a property that is in  
CSS2 but not in CSS2.1 not CSS3, a property that is in CSS3 but not  
CSS2 or CSS2.1? Currently, the CSS validator, checking against one  
profile or another, will always throw an error, claiming that the  
property X is not in the Y profile.

The CSS working group sees CSS as the sum of all CSS specifications  
that have reached the maturity of "candidate recommendation" or  
further, and thus disagrees that the usage of properties from mixed  
profiles is a problem. Quoting the CSS WG blog: by default the CSS  
validator should "include all CSS features that have so far made it  
to Candidate Recommendation stage." --- http://www.w3.org/blog/CSS/ 
2007/08/28/css_validator_ui

*** personal suggestion ***

In my opinion, this situation is confused and confusing because of  
the lack of an umbrella specification defining what CSS is, and what  
is a conformant CSS stylesheet. If CSS has no version and is the sum  
of all its specs, this should be defined somewhere. Without such a  
document, the mere existence of the CSS validator becomes an exercise  
in exegesis, and I don't think it's a good thing.

I have argued for this a number of times, but I may not have made the  
request publicly yet. If so, here is my formal, public request to the  
CSS working group: please produce a document (ideally a REC, and it  
doesn't have to be complicated) defining once and for all what a CSS  
style sheet is, and what a *conformant* CSS style sheet is. Thanks in  
advance.

*** end personal suggestion ***



Course of action for the weeks to come:

* Julien, our developer, is working on implementing the changes (at  
least number 2), and while it is tricky, we have found an algorithm  
that mimics the requested behavior, while remaining relatively  
performant, and not requiring a complete rewrite of the tool:
  - the validator will keep the option of validating against a single  
profile, and for that, the behavior should remain the same. Time  
permitting, the validator could note, whenever stumbling on an  
unknown property, whether the property is available in another known  
profile of CSS.

  - by default, if no specific profile is given, the validator will  
check against CSS2.1 as a basis. Upon finding a property (or value)  
not in accordance with CSS2.1, it will look in other profiles, and if  
the property or value is OK in e.g CSS3, then the error would be  
dropped. If the property or value is erroneous in every profile  
known, an error would be produced.

* The CSS working group is meeting next week, and Bert, on its  
behalf, committed to producing, by the end of next week, a public  
document explaining the vision of the group for CSS, and providing  
guidance for (as a start) the behavior of checkers such as the W3C  
CSS validator.


I hope this is an accurate summary of the discussions and decisions,  
with apologies if I omitted or misrepresented anything.

As usual, feedback, ideas, suggestions and more than anything help  
(any java wiz with free time and good spirit out there?) most welcome.

Regards,
olivier
-- 
olivier Thereaux - W3C - http://www.w3.org/People/olivier/
W3C Open Source Software: http://www.w3.org/Status
Received on Wednesday, 5 September 2007 14:12:22 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 10 December 2014 20:00:45 UTC