W3C home > Mailing lists > Public > www-validator-css@w3.org > November 2008

Re: Warnings for non-applicable properties

From: Benjamin Hawkes-Lewis <bhawkeslewis@googlemail.com>
Date: Sun, 09 Nov 2008 11:31:19 +0000
Message-ID: <4916CA07.2010008@googlemail.com>
To: Paul Arzul <paul.arzul@gmail.com>
CC: www-validator-css@w3.org

Paul Arzul wrote:
> CSS defines when properties are applicable (see the Applies column:
> <http://www.w3.org/TR/CSS21/propidx.html>)
> 
> Should we generate warnings when properties are not applicable? For example:
> 
> p
> {
>     border-collapse : collapse;
> }
> 
> We could warn about the paragraph not being a table or inline-table
> element. (I get no warnings with Warnings set to All.)

That would only be reliable if one could assume default CSS for HTML and 
that p was an HTML element rather than an element in some random XML 
dialect - but you can't assume either from the raw CSS.

The validator could include additional UI (e.g. checkboxes to indicate 
that this CSS if for HTML and the valiator should assume the suggested 
default CSS from CSS 2.1) that would mitigate those problems.

--
Benjamin Hawkes-Lewis
Received on Sunday, 9 November 2008 11:31:57 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 27 June 2012 00:14:21 GMT