W3C home > Mailing lists > Public > www-validator-css@w3.org > January 2003

Possibly invalid warnings, and misc. nitpickings

From: Jeremy M. Dolan <jmd@pobox.com>
Date: Mon, 6 Jan 2003 01:00:54 -0500 (EST)
To: www-validator-css@w3.org
Message-ID: <20030106060153.GA10621@foozle.attbi.com>




My page loads two CSS files, one contains:

h1 {
  font-size: 1.5em;
  margin: 0 auto;
  padding: 6px 40px;
  text-align: center;
  border: 1px solid;   /* NOTE THIS */
  width: 19em;
}

and the other:

h1 {
  color: white;
  background-color: #8e0000;
  border-color: black;       /* NOTE THIS */
}

When run through the validator, I get:

# Line : 13 Level : 2 Redefinition of border-left-color : h1
# Line : 13 Level : 2 Redefinition of border-top-color : h1
# Line : 13 Level : 2 Redefinition of border-bottom-color : h1
# Line : 13 Level : 2 Redefinition of border-right-color : h1


By reading http://www.w3.org/TR/REC-CSS1#border it seems to allude
that an omitted color still explicitly sets the border color to the
color of the element itself.

I changed the CSS to just set border-width and border-style, and that
got rid of the warning. It seems having border explicitly set an
omitted color to the same value it would be anyhow (as with setting
just -width and -style) causes rather meaningless errors. Just wanted
to make sure that warning is being thrown for good cause.

(I wanted to eliminate the warning so users clicking the "Valid CSS"
link on my pages see both no errors, and no warnings, and hopefully
will be envious and fix their own pages. Yeah, right. I can dream.)

Also, there's a slightly different page layout between the no errors
and no errors or warnings page. You may want to add the <hr> to
display on both:

---

W3C CSS Validator Results for http://jmd.us/reading-log/

Congratulations!

---

W3C CSS Validator Results for http://jmd.us/reading-log/

<hr>

No error or warning found

Congratulations!

---

And (ok, this is getting picky now) the bottom of the validation
output says "Last Updated : [...]". It might be more clear to instead
say "Generated on [...]".

Thanks!

-- 
Jeremy M. Dolan <mailto:jmd@pobox.com> <http://jmd.us/>
PGP: 1024D/3C68A1BA 9470 210C A476 FFBB 6D11  0223 0D1C ABFC 3C68 A1BA
Received on Monday, 20 January 2003 18:21:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 27 June 2012 00:14:11 GMT