4 replies [Last post]
eddy
eddy's picture
Offline
Enthusiast
Last seen: 8 years 27 weeks ago
Timezone: GMT+2
Joined: 2006-01-27
Posts: 59
Points: 0

http://www.indydutch.nl

css: /themes/vandam4/style.css

The css does not validate because I use the same colors for different elements.
For instance, the first error is that I use the same colors for #menu h3 en #menu li a.active.

Why is that not allowed?

Anyone who hates kids can't be all bad.
W.C. Fields

Chris..S
Chris..S's picture
Offline
Moderator
Last seen: 7 years 3 weeks ago
Timezone: GMT+1
Joined: 2005-02-22
Posts: 6078
Points: 173

There are no errors in that

There are no errors in that stylesheet. There are a number of warnings.

Warnings indicate something that MIGHT be a problem under some circumstances. That particular warning is saying that the background colour in one context is the same as the foreground colour in another. If somehow the html structure allowed the two rules to be applicable at the same time, then the text wouldn't be visible. The CSS validator isn't too clever about valid HTML structure and it is not looking at your page - so it can't tell if the circumstance does or doesn't occur - so it just warns you.

Generally warnings are nothing to worry about. Although in your case I'd fix the font-family names.

It is possible to construct a validator string for Firefox so that you don't see the warnings.

http://jigsaw.w3.org/css-validator/validator?profile=css21&warning=0&uri=

eddy
eddy's picture
Offline
Enthusiast
Last seen: 8 years 27 weeks ago
Timezone: GMT+2
Joined: 2006-01-27
Posts: 59
Points: 0

thank you for your

thank you for your explanation

Anyone who hates kids can't be all bad.
W.C. Fields

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 40 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

It more acurately

Edit/ Didn't see Chris sneak in ahead, and the point about about the url arguments is a good one I've always customised mine from back when it was default validating to CSS2 rather than 21 and throwing errors on display:inline-block

It more acurately says:
"Same colors for color and background-color in two contexts .fotoblok and .item-list .icon"

Which is from system.css and then there are a few for another stylesheet.

They are only cautionary warnings and 'context' is the operative word The validator is just worried that there might be conflicts between backgrounds and foreground colours, it's for you to adjudge whether things are ok or not state the colours/backgrounds again if they can be inherited through.

Bear in mind that the jigsaw validator has limitations and can't actually see that these might not be problems just as it likes to throw out a warning when it doesn't find colour and background property pairs, but it can't tell that a parent element is actually taking care of the background and that a user wouldn't be likely able to override a specific class or ID that you had used.

Overall validated stylesheets is of far less importance than validated markup, I don't particularly care about validating stylesheets, but if I do, and find any problems they are fairly easily dealt with.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

eddy
eddy's picture
Offline
Enthusiast
Last seen: 8 years 27 weeks ago
Timezone: GMT+2
Joined: 2006-01-27
Posts: 59
Points: 0

Also thanks for your

Also thanks for yoyr explanation.

Well i validate my css mostly because sometimes it looks different in FF than IE because of a forgotten background-color of an element.
And ofcourse I take pleasure in knowing that everything is validated.

Anyone who hates kids can't be all bad.
W.C. Fields