W3C home > Mailing lists > Public > www-style@w3.org > January 2015

[selectors] Previous-sibling combinator

From: Marat Tanalin <mtanalin@yandex.ru>
Date: Thu, 29 Jan 2015 03:34:11 +0300
To: Tab Atkins Jr. <jackalmage@gmail.com>
Cc: "www-style@w3.org" <www-style@w3.org>
Message-Id: <5270101422491651@web29j.yandex.ru>
We should probably reconsider adding the previous-sibling combinator [1] to CSS since:

    * the subject indicator is dropped [2];

    * the `:has()` function will not be available in fast profile (and therefore in CSS) [3].

Thanks.

[1] https://lists.w3.org/Archives/Public/www-style/2012Jan/1245.html
[2] https://lists.w3.org/Archives/Public/www-style/2014Feb/0617.html
[3] http://dev.w3.org/csswg/selectors/#fast-profile



28.01.2012, 03:34, "Tab Atkins Jr." <jackalmage@gmail.com>:
> 2012/1/27 Marat Tanalin <mtanalin@yandex.ru>:
>> And how would you write following selector using subject indicator?
>>
>>  P - UL > LI {...}
>
> Using the future extension to :matches() to allow complex selectors:
>
> :matches(!ul + p) > li {...}
>
> Or, if I get my way, with :has():
>
> ul:has(+p) > li {...}
Received on Thursday, 29 January 2015 00:35:27 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:50 UTC