W3C home > Mailing lists > Public > www-style@w3.org > November 2010

RE: [css-selectors] Invalid selectors should not cause the entire group to be dropped

From: Sylvain Galineau <sylvaing@microsoft.com>
Date: Tue, 30 Nov 2010 21:00:26 +0000
To: Tab Atkins Jr. <jackalmage@gmail.com>, Anne van Kesteren <annevk@opera.com>
CC: Peter Beverloo <peter@lvp-media.com>, "www-style@w3.org" <www-style@w3.org>, "daniel.glazman@disruptive-innovations.com" <daniel.glazman@disruptive-innovations.com>
Message-ID: <045A765940533D4CA4933A4A7E32597E2A552788@TK5EX14MBXC115.redmond.corp.microsoft.com>
> From: www-style-request@w3.org [mailto:www-style-request@w3.org] On Behalf
> Of Tab Atkins Jr.
> Sent: Monday, November 15, 2010 9:48 AM
> To: Anne van Kesteren

> > Could you give an example? I do not think it is very likely that sites
> > would rely on this. Effectively the site would be relying on the
> > declaration block not being applied.
> 
> I suspect that sites rely on exactly that.  Like Boris pointed out, using
> a prefixed selector functions as a rendering-engine selector,
> like:
> 
> foo bar, ::-webkit-foo {
>   /* These rules are only seen by Webkit */ }
> 
> Careful choice of the ::-webkit-foo (there's plenty of them choose
> from) will ensure that this hack doesn't have any extra effects on the
> page.

Just snoop around for CSS hacks. For instance, at 
http://paulirish.com/2009/browser-specific-css-hacks/ we have the following
which both use this pattern:

/* Firefox only. 1+ */
#veinticuatro,  x:-moz-any-link  { color: red }
 
/* Firefox 3.0+ */
#veinticinco,  x:-moz-any-link, x:default  { color: red  }

So people have come up with it. I have, however, no usage data on hand that
implies these hacks are so prevalent we wouldn’t' want to make this change.
Received on Tuesday, 30 November 2010 21:01:00 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:34 GMT