Re: Check existence of class names

On Mon, 16 Aug 2010 08:28:34 +0300, Philip Taylor (Webmaster, Ret'd) <P.Taylor@rhul.ac.uk> wrote:

> But when you talk of a "definition", are you not leaving the
> world of HTML and entering the world of CSS ?  If I write

Yes, I am. That's the reason I was talking about the thing being
in between Markup and CSS Validators. Probably, something else
like MobileOK Checker is even better tool to include these new
features, I do not know. It was just a guess that Markup Validator
is the best candidate...

> 	<p class="First"> ... </p>
>
> where would you expect to find a definition for "First" ?
>
> The only place I can think of is in a CSS file, where one
> might write
>
> 	.First {text-indent : 0em}
>
> But it is not possible for an HTML validator to recognise that
> this is a definition for a possible class "First", since to
> do so would require a knowledge of the grammar of CSS as
> opposed to the grammar of HTML {which is all that an HTML
> validator has}.  Do you see the problem ?

I see an additional task (or few of them) for developers.

A possible way is to extend CSS Validator so that it can show
all names defined for classes, pseudo-classes etc in case of
"Valid CSS" result, extend Markup Validator to show a list of
used names (classes, ids etc), and create a new service in Unicorn
which compares those lists and makes relevant conclusions.

Regret I cannot volunteer for any of these tasks...

> ** Phil.
>

-- 
Vladimir Chukharev
Tampere University of Technology

Received on Monday, 16 August 2010 13:37:46 UTC