Style Checker problems

For technical support for all editions of CSE HTML Validator. Includes bug reports.

Style Checker problems

Postby laurentricci » Thu Feb 07, 2008 12:59 pm

Hi Support Team,

I have just bought your excellent product, but I am a bit struggling
with the css style checker:

1/ Is it possible to change the rules of the css style checker ? I would
like for example to allow class selector containing the underline ('_')
character in addition to a-z,A-Z,0-9 and the hyphen ('-').

2/ I would like to disable some style checks, but I can't find any
documentation of the flags 608 to 659. I have only found the description
of flags 600 to 607.
(http://www.htmlvalidator.com/htmlval/v80/docs/index.html?engine_styles_tab.htm).

I am using the latest version 8 professional, on Windows XP Pro fully
up to date.

Any help would be greatly appreciated.

Regards, Laurent
laurentricci
Rank 0 - Newcomer
Rank 0 - Newcomer
 
Posts: 3
Joined: Wed Feb 06, 2008 8:36 pm

Re: Style Checker problems

Postby Lou » Thu Feb 07, 2008 2:44 pm

laurentricci wrote:1/ Is it possible to change the rules of the css style checker ? I would like for example to allow class selector containing the underline ('_') character in addition to a-z,A-Z,0-9 and the hyphen ('-').

I'm not part of the "Support Team" but I guess my question is why?

The way I read the CSS standards published by W3C, the underline is not included in the grammar. If the Validator tool was changed to not flag the underline as an error in CSS, it would no longer be as effective as a tool to validate CSS.

Or am I missing something?
Lou
Say what you will about Sisyphus. He always has work.
User avatar
Lou
Rank IV - Intermediate
Rank IV - Intermediate
 
Posts: 190
Joined: Fri Jul 29, 2005 5:55 pm
Location: MD

Postby Albert Wiersch » Thu Feb 07, 2008 5:15 pm

Hello,

In the next major release, CSE HTML Validator v9.0 will accept the underscore in class and ID names by default because it seems that all browsers support this. This allowance of underscores can be turned off if desired in the Validator Engine Options. In v8.0, you should be able to right-click on the message and disable it if you'd like.

The flags that are not documented in the documentation are reserved for future use or user-defined use. You may want to try right-clicking on some of the messages to disable them or change their type.

I hope this helps.
Image
Albert Wiersch
User avatar
Albert Wiersch
Site Admin
Site Admin
 
Posts: 2439
Joined: Sat Dec 11, 2004 10:23 am
Location: Near Dallas, TX

Underscore in class and ID selectors

Postby laurentricci » Thu Feb 07, 2008 7:38 pm

Hi,

Many thanks to all of you for your answers.

Lou, I loved your way of sending me back to the basics... It is a good question to ask me why I would like to allow the underscore character to the class and ID selectors. The '_' was not allowed in CSS1, it is allowed in CSS2 and is supported by all major recent browser (IE6, IE7, FF, Opera, Netscape).
For ensuring CSS1 compatibility, you are right it is better to avoid the '_', but CSS1-only browsers are now really rare in the wild. (http://www.webmasterworld.com/forum83/4301.htm)

Albert, thanks for your message. I didn't notice how simple it was to disable or change the type of a message by right-clicking the message itself. It is good to know that the underscore character will be allowed in v9.0.

Thanks for your help
laurentricci
Rank 0 - Newcomer
Rank 0 - Newcomer
 
Posts: 3
Joined: Wed Feb 06, 2008 8:36 pm

Re: Underscore in class and ID selectors

Postby Lou » Thu Feb 07, 2008 9:24 pm

laurentricci wrote:The '_' was not allowed in CSS1, it is allowed in CSS2 and is supported by all major recent browser (IE6, IE7, FF, Opera, Netscape).
For ensuring CSS1 compatibility, you are right it is better to avoid the '_', but CSS1-only browsers are now really rare in the wild.

My bad. I thought about rechecking CSS2 but got lazy and check the copy of CSS1 I had.

So you are correct. But give me this, just because "all major recent browser(s)" is not the highest recommendation. (I'm trying to save a little self-respect, :oops: )
Lou
Say what you will about Sisyphus. He always has work.
User avatar
Lou
Rank IV - Intermediate
Rank IV - Intermediate
 
Posts: 190
Joined: Fri Jul 29, 2005 5:55 pm
Location: MD

Re: Underscore in class and ID selectors

Postby Albert Wiersch » Fri Feb 08, 2008 10:59 am

Lou wrote:So you are correct. But give me this, just because "all major recent browser(s)" is not the highest recommendation. (I'm trying to save a little self-respect, :oops: )


Yep, I forgot about that. The underscore is allowed in a CSS2 errata document.

Here is the documentation for the upcoming new option:

Allow underscores in class and ID names - Check this box to allow underscore characters (_) in CSS class and ID names. An errata document to CSS2 allows underscores. Underscores should be well supported in current versions of modern browsers. Older browsers like Netscape Navigator 4.x and Opera 5.x and older will likely ignore any class or ID name that contains underscores, though Internet Explorer 4.x and above allow underscores. It is recommended that you uncheck this option only if older browser support is needed. You may also want to consider using the hyphen character (-) instead of an underscore. This option is enabled by default. (New v9.00)
Image
Albert Wiersch
User avatar
Albert Wiersch
Site Admin
Site Admin
 
Posts: 2439
Joined: Sat Dec 11, 2004 10:23 am
Location: Near Dallas, TX

Re: Underscore in class and ID selectors

Postby laurentricci » Fri Feb 08, 2008 11:48 am

Hi Lou,

I am agreeing with you, all major recent browser(s)" is not the highest recommendation, and if you want to be compatible with old browsers you will have to avoid the underscore in selector names.

According to http://www.nic.fi/~tapio1/Teaching/Models/Model6.html), the '_' in css selectors is supported from IE5, Netscape 4.79, Opera 6.0.

Cheers, Laurent
laurentricci
Rank 0 - Newcomer
Rank 0 - Newcomer
 
Posts: 3
Joined: Wed Feb 06, 2008 8:36 pm


Return to CSE Tech Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron