W3C home > Mailing lists > Public > www-style@w3.org > April 2012

Re: [selectors5] Proposal for a pseudo combinator

From: Marat Tanalin | tanalin.com <mtanalin@yandex.ru>
Date: Fri, 06 Apr 2012 03:15:02 +0400
To: Tab Atkins Jr. <jackalmage@gmail.com>
Cc: www-style list <www-style@w3.org>
Message-Id: <45841333667702@web29.yandex.ru>
I always set default `background-repeat` to `no-repeat` via following rule:

    :after {background-repeat: no-repeat; }

It's quite possible that it can then be overrided like:

    .example :before {background-repeat: repeat-x; }

Generated content is widely used currently, and this is _not_ rare or stupid. It's reality that should not be broken by a questionable syntax-improvement.

06.04.2012, 03:02, "Tab Atkins Jr." <jackalmage@gmail.com>:
> Argh, it was just pointed out to me that we can't get full
> backward-compat even with my last paragraph, because of the descendant
> combinator.
> A current selector like "p ::before" means "the before pseudo of all
> descendants of p". šIn my proposal, it would instead mean "the before
> pseudo of p".
> It's possible that this form of selector is very rare - after all,
> it's a pretty stupid selector. šI expect it to appear only in those
> weird CSS hack experiments that use tons of pseudos to achieve some
> cool result. šIf so, then we can just let its meaning change.
> I'd need to do some testing, though. šIf it does cause breakage, we'd
> need to choose a different syntax for the combinator.
> ~TJ
Received on Thursday, 5 April 2012 23:15:33 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:57 UTC