This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 2421 - Warning for no background with color when background declared.
Summary: Warning for no background with color when background declared.
Status: CLOSED FIXED
Alias: None
Product: CSSValidator
Classification: Unclassified
Component: CSS 1.0 (show other bugs)
Version: CSS Validator
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: qa-dev tracking
URL: http://www.jabcreations.com/temp/xhtm...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-27 21:06 UTC by John A. Bilicki III
Modified: 2007-09-26 12:32 UTC (History)
0 users

See Also:


Attachments

Description John A. Bilicki III 2005-10-27 21:06:40 UTC
A warning is given that there is no declared background when a color is declared
regardless of the fact that a background is indeed declared!  It is declared as
transparent!  To the best of my knowledge background: transparent; is valid CSS.
 It also keeps hovered tree like css menus on my new site layout staying blue
(versus black) to give a nice visual of the hierarchy of the menu system.

So warnings should not pop up for no background declaration if the background is
declared (regardless of it's value so long of course as it is valid).

Here is the CSS url...
http://www.jabcreations.com/temp/xhtml/themes/theme-city_w3c.css
(this file will not be modified during development versus the file
theme-city.css will probally be modified and may contain temp. errors or other
unrelated warnings.

There are no other warnings or errors in this css file (and the xhtml pages all
validate just fine).
Comment 1 Robin Liang 2005-10-28 10:46:17 UTC
I agree. We should not get a not-valid CSS just because not having a
background-color which in many cases are defined using background images from a
higher level.
Comment 2 reisio 2006-02-11 06:29:52 UTC
@John
While it's not explicitly worded, I gather the meaning is roughly equivalent to
"you have no _color_ specified", not "you have no _value_ specified".  After
all, "transparent" is not a color (and according to the spec, it's not even a
'value', but a 'keyword'), and using it does not get around the possible problem
the warning is designed to warn you about (that you possibly will not be able to
easily read the text).

@Robin
It doesn't say it's not valid - in fact it says it "validates" - it merely lists
"warnings" (not "errors") which _could_ cause problems.

The statement could be reworded to leave less room for confusion.
Comment 3 John A. Bilicki III 2006-02-11 18:24:25 UTC
This is the reference I'm going with...
http://www.w3.org/TR/css3-color/#transparent

According to this since CSS1, "transparent" has been a valid background value.

So it is a valid value and I am assuming the validator is intended to validate
against the level of CSS/(X)HTML...though there is no way I am aware of
declaring the level of CSS...that is declared or in the case of CSS - used.

If it is a valid value (regardless of it's type) then there should be no warning.

So the warning is an error as it fails to recognize the valid value.
Comment 4 reisio 2006-02-13 18:08:28 UTC
Again, the warning is about something that requires an opaque color to be
satisfied.  The entire purpose of the warning is screwed over if you allow
'transparent'.
Comment 5 John A. Bilicki III 2006-02-28 17:36:53 UTC
Where does it say opaque color needs to be "satisfied"? Elements have their
background set to transparent by default. So by your argument you should spam
everything in the validator that does not declare any background color whatsoever.

There simply is no reason to warn the webmaster that there is no background
color set when the webmaster has EXPLICITLY set the background to transparent.
Comment 6 Margaret 2006-04-10 03:14:36 UTC
STUCK!  A HREF tags... I need transparent as background-color or else, I have to write lots of separate lines for a href tags that falls on different background colors which are so many!  ;-(
Comment 7 Peter Bunyan 2006-05-05 18:56:21 UTC
What I find annoying is that inline elements with a colour have a warning when no background is set - inline elements should be transparent by default - adding a background colour may obscure background text. Why should I have to copy and paste 'background: transparent' for elements that have a transparent background by default?
Comment 8 Olivier Thereaux 2007-07-17 06:54:27 UTC
Ditto Bug #768: we moved the "level" of this warning to the lowest level, amongst other warnings of potential accessibility issues. 

I think this is the closest we can get to consensus. 

Moving to [close] this bug.