- From: Brad Kemper <brad.kemper@gmail.com>
- Date: Thu, 10 Dec 2009 08:28:47 -0800
- To: fantasai <fantasai.lists@inkedblade.net>
- Cc: www-style@w3.org
- Message-Id: <70936FCF-643C-4685-8BD2-00A7DEC14A35@gmail.com>
On Dec 8, 2009, at 11:48 PM, fantasai wrote: > My proposal is two syntaxes. The first is an at-rule, which is handy if > part of the style sheet depends on a major CSS feature such as Tempate > Layout. > > @supports ( declaration-block ) { > ruleset > } I like it. Of course, I am one to say publicly that browser detection is useful (which I know is contentious). Like this: input#userID { background-image: url(images/label-UserID.png); } @supports ( -webkit-box-reflect:below ) { /* webkit UAs only: */ /* (nothing to do with box-reflect) */ input#userID { background-image: none; } } input:focus {background-image: none; } If we could also test attribute support, then it would be better (and less contentious, probably): input#userID { background-image: url(images/label-UserID.png); } @supports [placeholder="User ID (required)"] { /* anything that support's Safari's placeholder attribute: */ input#userID { background-image: none; } } input:focus {background-image: none; } And of course, there is also this: @supports ( color:#000 ) { /* newer UAs only!! (post-2010 or whatever): */ }
Attachments
- application/pkcs7-signature attachment: smime.p7s
Received on Thursday, 10 December 2009 16:29:27 UTC