- From: Brad Kemper <brkemper@comcast.net>
- Date: Sun, 21 Oct 2007 14:25:20 -0700
- To: www-style WWW Style <www-style@w3.org>
- Message-Id: <33840066-FF30-49D2-927C-CB61EB35A124@comcast.net>
Media Queries seems like a natural fit for UA detection. Just as it detects other specifics of the UA, it would be helpful if it caught basic AU identification information too, for those times when it is necessary to send different rules to different user agents (due to varying levels of support for CSS features). Thus, implementors who are already working on incorporating Media Queries, or have done so already, should be able to add a few more media features. For instance, I would like to be able to do something like this: @media screen and (renderer:AppleWebKit) and (min-build: 523.11), screen and (ua:Safari) and (min-version: 3.03) { ... } So I would propose this part of the Media Queries Candidate Recommendation be extended thusly: media_feature: width | min-width | max-width | height | min-height | max-height | device-width | min-device-width | max-device-width | device-height | min-device-height | max-device-height | device-aspect-ratio | min-device-aspect-ratio | max-device- aspect-ratio | color | min-color | max-color | color-index | min-color-index | max-color-index | monochrome | min-monochrome | max-monochrome | resolution | min-resolution | max-resolution | scan | grid | renderer | ua | min-build | max-build | min-version | max-version Where "renderer" referred to the rendering engine (Gecko, AppleWebKit, Trident), "ua" referred to the name of the user agent (Safari, FireFox), "build" referred to the build number of the rendering engine, and "version" referred to the version of the user agent. Values would be determined by the software publishers to be unique identifiers (or shared identifiers in the case of shared rendering engines). This this to be useful, it would need to be incorporated into software ASAP, so it helps that Media Queries is mature and stable, and that these would just be a few more properties to support. On Oct 18, 2007, at 7:45 AM, Nikodem wrote: > > @ua ie==8 > { > // hacks for Internet Evil 8 > } > @ua ff<=3 > { > // hacks for Firefox 3 or older > } > @ua opera || ff > { > // hacks for Opera and Firefox > } > @ua ff && ie > { > // always ignored > } > > I wonder mostly about IE (other UAs are generally good), because I > don't wanna see anymore such shit like: > > <!--[if IE]><link rel="stylesheet" href="ie-sux.css"/><![endif]--> > <![if !IE><link rel="stylesheet" href="non-ie-rox.css"/><![endif]> > <!-- non-commented <![if ...]> is also incorrect HTML code --> > <!--[if IE]><script src="re-styler.js"></script><![endif]--> > * html div#123 > d\iv#abc > > My proposal, even if will be issued in IE 99, can clear CSS code. > > -- > Nikodem > JID: nikn@jabber.org >
Received on Sunday, 21 October 2007 21:25:29 UTC