W3C home > Mailing lists > Public > www-style@w3.org > August 2008

Re: @media and browsers conditional statments

From: Simetrical <simetrical@gmail.com>
Date: Tue, 5 Aug 2008 11:43:33 -0400
Message-ID: <7c2a12e20808050843xd8dc848s21a4d7066e0c13a4@mail.gmail.com>
To: "Jens Meiert" <jens@meiert.com>
Cc: www-style@w3.org
On Tue, Aug 5, 2008 at 3:36 AM, Jens Meiert <jens@meiert.com> wrote:
> At least this is more maintainable than e.g. "Conditional Comments" …
> However, "user agent sniffing" means a maintenance problem in its own,
> and history already shows that it never works reliably [1].

If individual sites misuse a CSS-based UA-sniffing capability,
negatively affected browsers will provide a way to work around that,
by spoofing.  That's no different from the situation today: minority
browsers like Opera still need to (and do) provide a robust spoofing
mechanism to deal with poorly designed sites.  They would just have to
(eventually) extend that existing capability to spoof CSS conditional
statements as well.

The point is that UA sniffing is inevitably the cleanest way to do
things in some cases, and in those cases a clean and robust way to do
it should be provided.  That it will be misused is no argument.
Similar capabilities are already misused, but providing more ways for
poorly-designed sites to misuse them will make them no more poorly
designed.  On the other hand, it *will* make the well-designed sites
simpler to author and maintain, and that's the point here.

> Also, I wonder if these approaches are not standards-adverse in principle.

No, they're not.  Any robust (programming) standard needs to
acknowledge that there will be some deviations from the standard, and
provide ways to handle them.  This isn't standards-adverse, it's just
realistic.  CSS is already better than most in its provision for
vendor-specific prefixes, but it could be improved significantly if it
took the simple step of adding rendering engine/platform-sniffing
capabilities.  It would probably be a few extra paragraphs in the
specification.
Received on Tuesday, 5 August 2008 15:44:10 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:11 GMT