Re: Unexpected valid CSS

2008/9/12 David Dorward <david@dorward.me.uk>:
>
> R.W. Crowl wrote:
>> The above code in http://www.iconsfestival.com/ validates. My
>> expectation is that it would fail because "ody" is not a recognized tag.
>> Is this a bug in the validator or in my understanding of what is valid?
>
> The latter. HTML doesn't have a monopoly on being styled using CSS.

ok, but i can't think of anything other than (x)html that has
front-end traction. regardless, this feels like another instance where
we're deliberately not being helpful for the sake of technical
completeness. should we be ignoring obvious typographical errors
("ody" was surely meant to be "body")? isn't this what warnings are
for? further, if the css was submitted/found via (x)html, then the
validator *knows* that this is an error as it is aware of the context.

a similar example:

body
{
    colour: red;
    background-colour: blue;
}

yields:

3  body  Property colour doesn't exist : red
4  body  Property background-colour doesn't exist : blue

more intuitive and far easier to diagnose would have been:

The property colo*u*r is unknown. Perhaps you meant color?

a lookup table of valid css properties or (x)html elements
cross-referenced via the edit distance[1,2] algorithm would be rather
helpful, imho.

- p

--
1.
Levenshtein distance - Wikipedia
http://en.wikipedia.org/wiki/Levenshtein_distance

2.
Re: value 'scroll' for background-attachement
http://lists.w3.org/Archives/Public/www-validator-css/2005Aug/0059.html

Received on Friday, 12 September 2008 10:30:44 UTC