The Colab

The in-house web department of Sole Technology, Inc.


January 25, 2006

For the tee shirt

Posted by: c00ler

What current bug in the w3c’s CSS validator affects how you specify units of measure? It’s a new bug, causing valid css to be marked as no good. The first time we noticed it was on emericaskate.com, you can see the “fix” for it in our css. First correct answer gets the Hot Tee.


10 Comments

  1. January 25, 2006 Dane

    According to the CSS spec, you are allowed to declare line-height values without declaring a unit of measure. The default unit is ‘em’, so a perfectly valid declaration like this:

    p {font: bold 1.4 Georgia, serif;}

    Really means this:

    p {font: bold 1.4em Georgia, serif;}

    However, the current iteration of the W3C’s CSS validator currently returns an error if you do not include a unit of measure when declaring line heights. This is inconsistent with the CSS spec, and thus is a bug that should be fixed.

  2. January 25, 2006 ara

    I think the bug is :
    line-height: 0 generates parse error - http://www.w3.org/Bugs/Public/show_bug.cgi?id=2307

    You fixed it with “line-height:0px;”

  3. January 25, 2006 Dane

    Okay, I was hasty in my first response. The bug is only in reference to the actual “line-height” declaration, and it only crops up in the case of integers. Thus, the following examples will all validate:

    p {line-height: 1.3em;}
    p {line-height: 1.0em;}
    p {line-height: 1.3;}
    p {line-height: 1.0;}

    But this will return an error:

    p {line-height: 1;}

    The workaround is to add a decimal to the value (1.0), or to bite the bullet and add the unit (1em).

  4. January 25, 2006 nowax

    switch em codeflip to dane

  5. January 25, 2006 c00ler

    Wow, and we thought an elusion to line-height would be necessary; fat chance - You guys are on point. Dane definitely did that switch w/ mad style, but Ara rode away clean too, with the example of our fix & link to Bugzilla. Thankfully, we’ve got enough tees to go around, so if Dane & Ara could email me an address (bill at ghettocooler dot net), I’ll get em in the mail!

  6. January 25, 2006 joe d

    This is an outrage. I demand a recount!

  7. January 25, 2006 Nic

    comma

  8. January 30, 2006 sonja

    380?
    Asia?

    dunno..doe maar een gok! geef me dat tshirt nou maar gewoon!

  9. January 31, 2006 Crza

    I typed in hotcrew.com instead of thehotcrew.com…now I’m waiting for the IT dudes to roll up and ask me to stop looking at porn on company time. What was this post about again?

  10. February 09, 2006 nugget

    this sucks.


Comment closed.