[csswg-drafts] [css-env][css-link-params] Function to access stylesheet URL data (#10820)

Crissov has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-env][css-link-params] Function to access stylesheet URL data ==
In #6408, I apparently misremembered the existence of a proposal for a pseudo-function similar to `attr()`, `var()` or `env()`, so I will hereby submit one. ;)

The [Link Parameters module](https://drafts.csswg.org/css-link-params-1/) specifies several ways to pass parameters 
from a stylesheet (`link-parameters` property, `url()` function) or a random URL (`#param()`), e.g. embedded within an HTML document, 
to a target resource that understands CSS Custom Properties, i.e. usually a stylesheet or an SVG image. 

This proposal is about a more generic way at the receiving end: 
A new pseudo-function, say `arg()` (TBB), gives access to the query parameters <!--and fragment identifiers--> used in the URL to include the _stylesheet_ (or HTML/SVG/… document in case of inline styles). It works mostly identical to `attr()`, just is the same for all elements.

Variant: Instead of the URL parameters of the stylesheet, `arg()` accesses the query component of the host document. For SVG images with inline styles, the end result is the same.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10820 using your GitHub account


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

Received on Monday, 2 September 2024 14:59:23 UTC