W3C home > Mailing lists > Public > public-mobileok-checker@w3.org > July 2008

RE: STYLE_SHEETS_USE test

From: Abel Rionda <abel.rionda@fundacionctic.org>
Date: Fri, 4 Jul 2008 13:25:05 +0200
Message-ID: <09700B613C4DD84FA9F2FEA52188281903CEC298@ayalga.fundacionctic.org>
To: "Jo Rabin" <jrabin@mtld.mobi>
Cc: "public-mobileok-checker" <public-mobileok-checker@w3.org>, <public-bpwg-comments@w3.org>

Hi Jo,

>This is particularly fraught since CSS is by design open-ended so 
>outside of the syntax requiring certain combinations of valid tokens
and 
>punctuation, almost Anything Goes [1].

Yes, indeed. BTW, great song that reminds me of the opening scene of
Indiana Jones and the Temple of Doom...

So the definition of valid CSS under 2.4.8 is a simple syntax checking
without lexical checking at all. I think that call this "CSS Valid" is a
bit confusing for the user (CSS Valid would be inferred by the user as
*valid* as the spec of the CSS Level x states). 

Besides the special CSS Validity, STYLE_SHEETS_USE is still duplicating
some checks.  This test has a note regarding CSS properties that are
defined or not on Level 1:

"Note: The tests on CSS property values only apply to properties defined
by CSS Level 1; other properties are ignored for the purposes of this
test."

Having this note on mind and applying the following checks, 

--
"If the CSS Style contains at-rules (other than the @media at-rule, and
the media list of the @import at-rule), properties, or values that are
not recognized as being specified in CSS Level 1, warn

If the CSS Style contains a property with a value that is inappropriate
to it, warn"
--
Some questions come to my mind:

Is the same "not recognized" and "inappropriate"?, could a "not
recognized" value be appropriate?, I don't think so.

The first check contains the second one. Any warn reported by the second
will be also reported by the first. There are the following
possibilities:

- In case of a CSS Level 1 property with a "not recognized" value, both
checks apply.
- If the case is a non CSS Level 1 property the first check will report
a warn but, as stated by the special note, the second one will be
ignored.


Also both "not recognized" and "inappropriate" terms should be
clarified, i.e. is a font-size value of 1000px inappropriate? , is
"inappropriate" used as a synonym of a non CSS Level 1 valid value?


Anyway, I think we are going to run into problems in the current checker
implementation:

-I do no see a way to deactivate these features in our CSS validation
tool (CSS Validator makes a complete grammar validation) and making an
ad-hoc solution would tale a considerable development effort.
Particularly, STYLE_SHEETS_USE test (currently these subtests are not
made) is going to be hard to implement basing on the checker design and
our limited time to dedicate to this.

I am not sure what the best decision on this is if we want to release
checker in a reasonable time.


Regards,

Abel.



-----Mensaje original-----
De: Jo Rabin [mailto:jrabin@mtld.mobi] 
Enviado el: viernes, 04 de julio de 2008 11:00
Para: Abel Rionda
CC: public-mobileok-checker; public-bpwg-comments@w3.org
Asunto: Re: STYLE_SHEETS_USE test

Hi Abel

We jumped through a couple of hoops of fire around this subject possibly

during LC-1 or LC-2 (the mobileOK Jurassic Period, perhaps). As far as I

can recall the question was around exactly what is meant by "valid 
CSS1". This is particularly fraught since CSS is by design open-ended so

outside of the syntax requiring certain combinations of valid tokens and

punctuation, almost Anything Goes [1].

Consequently, we have the definition of valid CSS under 2.4.8:

     A resource is considered a valid CSS resource if it conforms to the

grammar defined in [CSS], Appendix B (see note below), except that 
@media at-rules, which are not part of the grammar, are allowed and are 
not considered invalid. The presence of at-rules, properties or values 
or combinations of properties and values that are not specified in [CSS]

does not constitute a validity failure for CSS. See 3.21 
STYLE_SHEETS_USE for treatment of such values. In addition, the @media 
at-rule and the presentation media list for the @import at-rule are 
taken into account when evaluating CSS.

[I've just  spotted that the clause "see note below" is a dangling 
reference and needs to be removed.]

So I think what is happening here is that the checker CSS Validation 
that is being carried out is actually stricter than that implied by 
CONTENT_FORMAT_SUPPORT and is potentially mis-reporting inappropriate 
combinations of properties and values as failures under that heading. 
They should in fact be reported under STYLE_SHEETS_USE.

Note particularly that it is not invalid to use properties that are not 
known in CSS1, e.g.

klingon {foo: bar;
     distance: 3light-years;
}

is valid, though it contains properties values and units that are not 
defined in CSS1.

Hence the warns rather than the failures in STYLE_SHEETS_USE.

Jo


[1] http://en.wikipedia.org/wiki/Anything_Goes_%28song%29



On 04/07/2008 09:17, Abel Rionda wrote:
> Hi,
> 
> While we were reviewing the test implementation status in checker
code,
> we found out some checks 
> of STYLE_SHEETS_USE regarding CSS values that we would like to comment
> [1]:
> 
> [begin STYLE_SHEETS_USE fragment]
> 
> If the CSS Style contains a property with a value that is
inappropriate
> to it, warn
> If the CSS Style contains a property with a value that requires a unit
> or a percentage:
>       If the unit (or percentage) is not present, warn
>       If the unit (or percentage) is inappropriate to the value, warn
> 
> [end STYLE_SHEETS_USE fragment]
> 
> All these checks are already made during grammar validation test
> (CONTENT_FORMAT_SUPPORT) and they would raise a *FAIL* (while in
> STYLE_SHEETS_USE at most we would get a *warn*)
> We do not see any benefit of this duplicity and, furthermore, due to
> they raise different level errors, it might lead the user to
confusion.
> 
> 
> Regards,
> 
> Abel.
> 
> [1]
>
http://www.w3.org/TR/2008/WD-mobileOK-basic10-tests-20080610/#STYLE_SHEE
> TS_USE
> 
Received on Friday, 4 July 2008 11:25:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 4 July 2008 11:25:33 GMT