Re: Warnings for non-applicable properties

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 UTC