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

> 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 UTC