- From: Jo Rabin <jrabin@mtld.mobi>
- Date: Fri, 04 Jul 2008 18:14:12 +0100
- To: Abel Rionda <abel.rionda@fundacionctic.org>
- CC: public-mobileok-checker <public-mobileok-checker@w3.org>, public-bpwg-comments@w3.org
> The problem is that, AFAIK, CSS Validator *does not* distinguish between > the subtests of STYLE_SHEET_USE. I mean, if we consider the example you > put in your last mail: I don't think we lose much by having a single warn for everything, frankly, so the text of the test would look like: a) Remove the following 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. b) change all from "if there is CSS Style" to say: If there is CSS Style (see 2.4.5 CSS Style) If all styles are restricted to presentation media types other than "handheld" or "all" by means of @media at-rules, warn If the CSS Style contains at-rules (other than the @media at-rule, and the presentation media type list of the @import at-rule), properties, or values that are not recognized as being specified in CSS Level 1, or if the value of a recognized CSS Level 1 property is incompatible with the property, warn would that work for the Checker Musketeers? Jo On 04/07/2008 17:35, Abel Rionda wrote: > Hi Jo, > > Hi Jo, > > Some comments inline: > >> So the most we can and should do is warn -- unless there is a basic >> syntax error like > >> zillon {planet:tharg { > >> in which case we should FAIL. > >> Can you tell the difference between that type of error and one of the >> STYLE_SHEET_USE types of error? > > Yes, I could distinguish (CSS Validator does) between parsing errors and > the other kind of errors that STYLE_SHEET_USE defines (these are raised > as warnings). > > The problem is that, AFAIK, CSS Validator *does not* distinguish between > the subtests of STYLE_SHEET_USE. I mean, if we consider the example you > put in your last mail: > >> There is a difference between STYLE_SHEET_USE-5, STYLE_SHEET_USE-6 >> color: orangey-blue; /* not a recognized value */ >> color: thin; /* a recognized value but not appropriate to color */ > > CSS Validator would provide us the following output: > > <warning> > <info>orangey-blue is not a color value</info> > [...] > </warning> > <warning> > <info>thin is not a color value</info> > [... ] > </warning> > > So this is our main concern about this test. We would have to implement > an ad-hoc solution that would wrap the output of CSSValidator and then > we should treat it in order to distinguish each subtest case. > > Unless I am missing something, this would be a considerable development > effort taking into account the available resources (time and human). > > Abel. > > > -----Mensaje original----- > De: Jo Rabin [mailto:jrabin@mtld.mobi] > Enviado el: viernes, 04 de julio de 2008 16:35 > Para: Abel Rionda > CC: public-mobileok-checker; public-bpwg-comments@w3.org > Asunto: Re: STYLE_SHEETS_USE test > > Hi Abel > > Aaargh, now that you point it out, the text of this test needs changing. > > Specifically the Note is wrong as STYLE_SHEET_USE-5 specifically tests > for properties that are not defined in CSS Level 1. So delete that note. > > There is a difference between STYLE_SHEET_USE-5, STYLE_SHEET_USE-6 > > color: orangey-blue; /* not a recognized value */ > > color: thin; /* a recognized value but not appropriate to color */ > > color: 22; /* ditto */ > > If anything I'd say that STYLE_SHEET_USE-7 and STYLE_SHEET_USE-8 are > both contained in STYLE_SHEET_USE-6. > > border-width: 22; /* requires a unit but doesn't have one */ > > border-width: 22Hz; /* has the wrong type of unit, though actually I am > > not sure this can happen in CSS 1 */ > > I would not be at all bothered if we combined all these into a single > clause, however it would have to remain a warn ... > > ... ref the checker's CSS validator. The whole discussion about CSS (if > I recall correctly) came up as a Last Call comment from Bert Bos. And > (again, if I remember correctly) we agreed to change. I don't know how > we could ignore that now. In any case, it is quite simply wrong to fail > on unknown properties etc. it's very much the intention of CSS that a > CSS2 style sheet works just fine in CSS1 simply by ignoring the stuff > that is not understood. > > So the most we can and should do is warn -- unless there is a basic > syntax error like > > zillon {planet:tharg { > > in which case we should FAIL. > > Can you tell the difference between that type of error and one of the > STYLE_SHEET_USE types of error? > > > Jo > > On 04/07/2008 12:25, Abel Rionda wrote: >> 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 17:15:13 UTC