You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 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 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.
/* in example.svg?color=green */:root {
--foo:arg(color); /* green */
}
#test {
fill:var(--foo);
stroke-color:arg(color);
}
The text was updated successfully, but these errors were encountered:
In #6408, I apparently misremembered the existence of a proposal for a pseudo-function similar to
attr()
,var()
orenv()
, so I will hereby submit one. ;)The Link Parameters module 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 used in the URL to include the stylesheet (or HTML/SVG/… document in case of inline styles). It works mostly identical toattr()
, 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.The text was updated successfully, but these errors were encountered: