W3C home > Mailing lists > Public > www-style@w3.org > February 2016

[selectors] Reference Combinators removed?

From: James Craig <jcraig@apple.com>
Date: Fri, 5 Feb 2016 02:11:54 -0800
Message-Id: <FFEB0957-E39A-470A-8C14-617519AD08F1@apple.com>
To: www-style list <www-style@w3.org>
The Reference Combinator was removed from the CSS4 selectors draft citing "lack of interest."

Yes, all this can be done with JavaScript, but if one of the goals of CSS is reduction of reliance on scripting, the interest could remain.

For example:

/* CSS-only highlight of the Maps POI pin when hovering over a sidebar details list, and vice versa */
.pin:hover /data-sidebaritem/ .sidebaritem  { /* highlight styles */ }
.sidebaritem:hover /data-pin/ .pin { /* highlight styles */ }

It looked like it would have also been especially useful for ARIA, which leverages IDREFs. 

/* display the tab panel whose controlling tab is selected */
.tab[aria-selected="true"] /aria-controls/ .tabpanel { display: block; }

/* highlight the current autocomplete suggestion for a custom combobox */
input /aria-activedescendant/ li { background: yellow; }
Received on Friday, 5 February 2016 10:12:30 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:09:00 UTC