Re: [csswg-drafts] [selectors] `/idref()/` combinator to follow element references for arbitrary IDREF attributes (#10970)

Hellooooo Lea :-)

Selection of ID/IDREF agnosticly from the attributes names is an old dream of mine. Long ago, SGML had "paired elements", linked through that mechanism and their styling required such a selecting hint. For those who were around back in the nineties, that was a topic I discussed during the famous Clamart CSS WG meeting.

I think the proposed combinator is not enough, let me explain... The whole thing is, at its roots, about catching a given value from a named attribute on an arbitrary element and finding another arbitrary element catching another named attribute of same value. The common denominator here is the value, the attribute names are only carriers.
The proposed combinator, as a functional thing, specifies only one of these two attributes where it should propose two, the target attribute and the source one, the latter defaulting to "id".

So two choices:

1. elaborate a mechanism allowing to "store" and "reuse" an attribute value (would be super powerful but CSS isn't a programming language, right ? :-)
2. make your functional idref combinator dual-valued with an "id" default if the second parameter is missing


-- 
GitHub Notification of comment by therealglazou
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10970#issuecomment-2388516015 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 2 October 2024 12:25:48 UTC