SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist FCC's Avatar
    Join Date
    May 2006
    Posts
    417
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Severity of CSS Warnings

    Hello all,

    I am using the CSS validator and my document validates as CSS. However, I get a big load of CSS warnings.

    I am just wondering how severe these warnings are and exactly what purpose do they serve anyways? I mean in the sense, if I get these warnings why not just make it so that my document doesn't validate as CSS and have me correct them.

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,556
    Mentioned
    183 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    Warnings are just warnings of things that you should check and do not invalidate your page. You can ignore the warnings totally and your page is still 100% valid. They are warnings because the validator isn't clever enough to know whether the warnings actually apply and is asking you to check.

    However you should really look at the warnings and then make a decision based on what they say and decide whether you should do anything about them.

    Most of the warnings will be be things like that you have specified no background color with your color etc. This means that you may have specifed a color:#fff and the validator is asking you to check that the background is not already #fff and so the text is invisible. A user stylesheet may have defined colors and you could also end up with conflicts.

    The validator isn't clever enough to know that you may have already defined the background color in the parent as it treats each element separately (I believe). In these cases you can avoid a warning by applying background:inherit. however that's not always what you may want.

    Warnings are just warnings advising you to check things and if you are satisfied that things are ok then you can leave them alone or you can go through and set a background color and a color for every element where one is defined etc.

  3. #3
    SitePoint Wizard bronze trophy Tailslide's Avatar
    Join Date
    Feb 2006
    Location
    Bedford, UK
    Posts
    1,687
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's a bit like when you were a kid and about to leave for school and your Mum would say:

    "Have you got your vest on?"
    (rolls eyes) "Yes mum"
    "Have you got your lunch money?"
    "Yes Mum"
    "Have you got your homework?"
    "Yes Mum"

    Think of it as nagging reminders for your own good.
    Little Blue Plane Web Design
    Blood, Sweat & Rust - A Land Rover restoration project


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •