- From: François REMY <francois.remy.dev@outlook.com>
- Date: Fri, 21 Dec 2012 12:38:16 +0100
- To: Adam Sobieski <adamsobieski@hotmail.com>, "www-style@w3.org" <www-style@w3.org>
Hi Adam,
I think there's already a proposal included in the draft that is aimed at solving this problem, even if its reserved section is not very developed right now (nor supported in any browser); see http://dev.w3.org/csswg/selectors4/#idref-combinators.
The current proposal features this syntax:
label:hover /for/ input { }
and there's a proposal for another syntax using functional notation:
input:linked-by(label:hover)
I guess your use-cases would be something like
figure:linked-by(a:hover) {
/* glow */
}
or
div.equation:linked-by(a)::after {
/* display the referencable name of the equation only if it's referenced at least once */
}
or
a:linked-to(*) {
/* display links to any anchor in a particular way */
}
a:linked-to(figure) {
/* display links to a figure anchor in a more particular way */
}
right?
________________________________
> From: adamsobieski@hotmail.com
> To: www-style@w3.org
> Date: Fri, 21 Dec 2012 10:58:27 +0000
> Subject: [selectors] An Idea for CSS4 Selectors
>
> CSS Working Group,
>
> Greetings, I have an idea for CSS4 selectors
> (http://dev.w3.org/csswg/selectors4/) involving the traversing of
> element references through XML attribute values, attribute values with
> anchor URL's or with XML element or HTML element ID's. The idea
> pertains to traversing elements in CSS4 selector syntax, traversing to
> other XML elements which can be described in selector syntax. Such CSS4
> selection syntax could be useful for styling XML elements, including
> hyperlinks, which reference other XML elements in a document, for
> example charts, diagrams, equations, and figures. Such CSS4 selection
> syntax could enhance some citations and referencing system
> implementations, could provide new CSS4 syntax expressiveness, and
> could provide new features for CSS4.
>
>
>
> Kind regards,
>
> Adam Sobieski
Received on Friday, 21 December 2012 11:38:49 UTC