News for hackers. Stuff that matters.
Re:Avoid browser-specific CSS hacks with CssUserAgent (cssua... by erikpukinskis on Sunday January 02, 2011 @07:48PM (#2061661)
Seems like a neat project. I wonder if it wouldn't be better to use feature-based classes instead of browser-based classes though.

In the example they have IE5&6 specific code:

    .ua-ie-5 .logo-area,
    .ua-ie-6 .logo-area
    {
    /* IE versions < 7.0 don't fully support transparent 24-bit PNGs */
      background-image: url(logo.gif);
    }
But wouldn't it be more sensible to have something like this:

    .no-png-support
    {
      background-image: url(logo.gif);
    }
That way you hit all relevant browsers... not just the ones whose quirks you know about?

There are no comments on this comment yet.