CSS Linked Parameters Module Level 1 W3C First Public Working Draft , 14 July 2026 More details about this document This version: https://www.w3.org/TR/2026/WD-css-link-params-1-20260714/ Latest published version: https://www.w3.org/TR/css-link-params-1/ Editor's Draft: https://drafts.csswg.org/css-link-params/ History: https://www.w3.org/standards/history/css-link-params-1/ Feedback: CSSWG Issues Repository Editors: Tab Atkins-Bittner ( Google ) Daniel Holbert ( Mozilla ) Jonathan Watt ( Mozilla ) Suggest an Edit for this Spec: GitHub Editor Copyright © 2026 World Wide Web Consortium . W3C ® liability , trademark and permissive document license rules apply. Abstract This spec introduces a way to pass CSS values into linked resources, such as SVG images, so that they can be used as CSS custom environment variables in the destination resource. This allows easy reuse of "templated" SVG images, which can be adapted to a site’s theme color, etc. easily, without having to modify the source SVG. CSS is a language for describing the rendering of structured documents (such as HTML and XML) on screen, on paper, etc. Status of this document This section describes the status of this document at the time of its publication. A list of current W3C publications and the latest revision of this technical report can be found in the W3C standards and drafts index. This document was published by the CSS Working Group as a First Public Working Draft using the Recommendation track . Publication as a First Public Working Draft does not imply endorsement by W3C and its Members. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than a work in progress. Please send feedback by filing issues in GitHub (preferred), including the spec code “css-link-params” in the title, like this: “[css-link-params] …summary of comment… ”. All issues and comments are archived . Alternately, feedback can be sent to the ( archived ) public mailing list [email protected] . This document is governed by the 18 August 2025 W3C Process Document . This document was produced by a group operating under the W3C Patent Policy . W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent that the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy . Table of Contents 1 Introduction 2 Setting a Link Parameter 2.1 In CSS: the link-parameters property 2.2 In The URL 2.3 Setting via the CSS url() Function 3 Using Link Parameters Privacy Considerations Security Considerations Conformance Document conventions Conformance classes Partial implementations Implementations of Unstable and Proprietary Features Non-experimental implementations Index Terms defined by this specification Terms defined by reference References Normative References Non-Normative References Property Index 1. Introduction SVG is stylable with CSS, and when used inline in HTML, this capability can be very useful. For example, an SVG icon can take on a different color based on whether the user is hovering it or not, just by applying a :hover rule to it that changes the fill property. When the SVG is referenced in a way that doesn’t allow selectors or CSS inheritance from the outer page to apply to it (such as embedding it via img or iframe in HTML), though, this functionality is lost. The only way to change the display of such "external" SVG images is to produce several of them, and change which image you’re referencing. This incurs delay on the page as a new resource is downloaded, and disallows dynamic effects like CSS Transitions. CSS link parameters are a way to set CSS custom environment variables on an "external" resource, either by a CSS property or thru a special fragment scheme on the URL. This gives a limited, but powerful, subset of the customizability that "inline" SVG images have to "external" SVG images. A link parameter is a pair of a <dashed-ident> name, and an arbitrary (possibly empty) <declaration-value> value. For example, an SVG image can be written to use link parameters , allowing it to have its colors changed on the fly, like: < svg > < path fill = "env(--color, black)" d = "..." /> </ svg > By default, it will fill its shape with black, as that’s the fallback color specified. But link parameters can customize the color in several ways: < img src = "image.svg#param(--color,green)" > img { link-parameters : param ( --color , green ); } .foo { background-image : url ( "image.svg", param(--color, green )); } 2. Setting a Link Parameter An external resource can be accompanied by a list of link parameters , each entry composed of a <dashed-ident> as a key, and a (possibly empty) <declaration-value> as the value. There are three ways to specify a link parameter : via the link-parameters property, which applies to the resource itself (if the element represents an external resource), and to all external resources used in CSS properties on the element via a special syntax in the fragment portion of the URL of an external resource via a param() argument in the url() syntax If specified in multiple of these ways, all of the link parameters are appended into a single list for the external resource, in the order: the link-parameters property on the element, if relevant the param() URL fragment identifiers the param() <url-modifier> s in url() If multiple link parameters exist with the same name, the last one in the list is used. How to access link parameters in the linked resource is defined in the next section, § 3 Using Link Parameters . 2.1. In CSS: the link-parameters property Name: link-parameters Value: none | <param()> # Initial: none Applies to: all elements and pseudo-elements Inherited: no Percentages: n/a Computed value: as specified Canonical order: per grammar Animation type: discrete The link-parameters property is one way to set link parameters on the element itself (if it is an element representing an external resource, such as an HTML img or iframe ), and on all external CSS resources specified on the element (such as background images, etc). Its values are: none No link parameters are specified. <param()> # A list of one or more link parameters . The param() function specifies a link parameter , with a key of the <dashed-ident> , and a value of the <declaration-value> ? . (If the <declaration-value> is omitted, it represents an empty value.) It has the syntax: <param()> = param( <dashed-ident> , <declaration-value> ? ) 2.2. In The URL A special "fragment identifier" can be used in the fragment of a URL used to reference an external resource. Several examples of existing "fragment identifiers" for SVG documents can be found in the SVG 1.1 specification . The syntax of an SVG parameter fragment identifier is: param( <dashed-ident> , <declaration-value> ? ) (using the CSS value definition syntax ; TODO define an actual parser for it). For example, to set the env(--text-color) custom environment variable of an SVG image to blue , one can reference the image with a url like “ http://example.com/image.svg#param(--text-color,blue) ”. Multiple link parameters can be passed to an image by appending multiple param() fragment identifiers to the URL. When combined, either with each other or with other "fragment identifiers", each value is separated with an & character, as in a URL’s query parameters. For example, if the image from the previous example also used env(--bg-color) , it could be referenced with a url like “ http://example.com/image.svg#param(--text-color,blue)¶m(--bg-color,white) ” to set both env(--text-color) and env(--bg-color) . Note: Spaces, and some other characters that might be valid in CSS syntax, are not technically valid in URLs. In some contexts, you might need to escape those characters to form a valid URL. In most cases, though, such as HTML’s a element or CSS’s url() function, spaces are accepted and do not need to be escaped. 2.3. Setting via the CSS url() Function When referencing an external resource via CSS, the param() function can be used in the url() function. But a common use-case is passing in values of the page’s own custom properties ; for example, a page might use a --primary-color custom property , and want to make an SVG image match. There’s no way, however, to integrate the value of a custom property in CSS into the URL passed to the url() function. To accommodate this, param() is a valid <url-modifier> . All the param() s specified as a <url-modifier> define link parameters , as for link-parameters . For example, if the site is using a --primary-color custom property to theme its elements with, and wanted an SVG background using env(--color) to reflect it, it could write: .foo { background-image : url ( "http://example.com/image.svg" param(--color, var(--primary-color )) ); } 3. Using Link Parameters When an external resource link has one or more link parameters specified, if the linked resource understands CSS (such as an SVG or HTML document), then those link parameters establish global custom environment variables for the resource with their name and value, accessible with the env() function in stylesheets. For example, if an SVG image wanted to expose a --color parameter, it could use it like: < svg > < g style = "fill: env(--color);" > < path d = "..." /> </ g > </ svg > It’s usually a good idea to make your SVG image usable even if no parameters are given, by providing "default values" for each of the custom properties. There are several ways to do this. On each env() function, provide a fallback value, like fill: env(--color, blue) . If the env() is going to be used a lot, such that providing a fallback for each individual env() is troublesome, store the custom environment variable in a custom property on the root element with the default specified, like: :root { --color : env ( --color , blue ); } In this example, if --color is provided via a linked parameter , var(--color) will contain its value. If not, it will contain the default blue value. In either case, var(--color) can be used in the stylesheet unconditionally, secure in the knowledge that it will always have a value. Privacy Considerations This specification introduces no new privacy considerations. Security Considerations This specification introduces a new way to pass information to a linked resource, potentially from a hostile source. While no explicit handshake is established for this channel, the use of env() to use the information minimizes the chance that the linked resource can be surprised by the information. The only way for the page to be vulnerable is to somehow be using an unknown env() in their styles, which will just result in invalid properties by default, and be visible in the developer’s Dev Tools. Any hostile information can also only affect individual CSS properties that the resource explicitly opts itself into. Conformance Document conventions Conformance requirements are expressed with a combination of descriptive assertions and RFC 2119 terminology. The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in the normative parts of this document are to be interpreted as described in RFC 2119. However, for readability, these words do not appear in all uppercase letters in this specification. All of the text of this specification is normative except sections explicitly marked as non-normative, examples, and notes. [RFC2119] Examples in this specification are introduced with the words “for example” or are set apart from the normative text with class="example" , like this: This is an example of an informative example. Informative notes begin with the word “Note” and are set apart from the normative text with class="note" , like this: Note, this is an informative note. Advisements are normative sections styled to evoke special attention and are set apart from other normative text with <strong class="advisement"> , like this: UAs MUST provide an accessible alternative. Conformance classes Conformance to this specification is defined for three conformance classes: style sheet A CSS style sheet . renderer A UA that interprets the semantics of a style sheet and renders documents that use them. authoring tool A UA that writes a style sheet. A style sheet is conformant to this specification if all of its statements that use syntax defined in this module are valid according to the generic CSS grammar and the individual grammars of each feature defined in this module. A renderer is conformant to this specification if, in addition to interpreting the style sheet as defined by the appropriate specifications, it supports all the features defined by this specification by parsing them correctly and rendering the document accordingly. However, the inability of a UA to correctly render a document due to limitations of the device does not make the UA non-conformant. (For example, a UA is not required to render color on a monochrome monitor.) An authoring tool is conformant to this specification if it writes style sheets that are syntactically correct according to the generic CSS grammar and the individual grammars of each feature in this module, and meet all other conformance requirements of style sheets as described in this module. Partial implementations So that authors can exploit the forward-compatible parsing rules to assign fallback values, CSS renderers must treat as invalid (and ignore as appropriate ) any at-rules, properties, property values, keywords, and other syntactic constructs for which they have no usable level of support. In particular, user agents must not selectively ignore unsupported component values and honor supported values in a single multi-value property declaration: if any value is considered invalid (as unsupported values must be), CSS requires that the entire declaration be ignored. Implementations of Unstable and Proprietary Features To avoid clashes with future stable CSS features, the CSSWG recommends following best practices for the implementation of unstable features and proprietary extensions to CSS. Non-experimental implementations Once a specification reaches the Candidate Recommendation stage, non-experimental implementations are possible, and implementors should release an unprefixed implementation of any CR-level feature they can demonstrate to be correctly implemented according to spec. To establish and maintain the interoperability of CSS across implementations, the CSS Working Group requests that non-experimental CSS renderers submit an implementation report (and, if necessary, the testcases used for that implementation report) to the W3C before releasing an unprefixed implementation of any CSS features. Testcases submitted to W3C are subject to review and correction by the CSS Working Group. Further information on submitting testcases and implementation reports can be found from on the CSS Working Group’s website at https://www.w3.org/Style/CSS/Test/ . Questions should be directed to the [email protected] mailing list. Index Terms defined by this specification CSS link parameter , in § 1 link parameter , in § 1 link-parameters , in § 2.1 none , in § 2.1 <param()># , in § 2.1 param() (function) , in § 2.1 definition of , in § 2.2 SVG parameter fragment identifier , in § 2.2 Terms defined by reference [CSS-COLOR-4] defines the following terms: blue [CSS-ENV-1] defines the following terms: custom environment variable env() [CSS-SYNTAX-3] defines the following terms: <declaration-value> [CSS-VALUES-3] defines the following terms: CSS value definition syntax [CSS-VALUES-4] defines the following terms: # , <dashed-ident> <url-modifier> ? url() | [CSS-VARIABLES-1] defines the following terms: custom property [FILL-STROKE-3] defines the following terms: fill [HTML] defines the following terms: a iframe img [SELECTORS-4] defines the following terms: :hover [URL] defines the following terms: fragment References Normative References [CSS-ENV-1] CSS Environment Variables Module Level 1 . 23 September 2025. FPWD. URL: https://www.w3.org/TR/css-env-1/ [CSS-SYNTAX-3] Tab Atkins Jr.; Simon Sapin. CSS Syntax Module Level 3 . 24 December 2021. CRD. URL: https://www.w3.org/TR/css-syntax-3/ [CSS-VALUES-3] Tab Atkins Jr.; Elika Etemad. CSS Values and Units Module Level 3 . 22 March 2024. CRD. URL: https://www.w3.org/TR/css-values-3/ [CSS-VALUES-4] Tab Atkins Jr.; Elika Etemad. CSS Values and Units Module Level 4 . 12 March 2024. WD. URL: https://www.w3.org/TR/css-values-4/ [CSS-VARIABLES-1] Tab Atkins Jr.. CSS Custom Properties for Cascading Variables Module Level 1 . 16 June 2022. CR. URL: https://www.w3.org/TR/css-variables-1/ [FILL-STROKE-3] Elika Etemad; Tab Atkins Jr.. CSS Fill and Stroke Module Level 3 . 13 April 2017. FPWD. URL: https://www.w3.org/TR/fill-stroke-3/ [HTML] Anne van Kesteren; et al. HTML Standard . Living Standard. URL: https://html.spec.whatwg.org/multipage/ [RFC2119] S. Bradner. Key words for use in RFCs to Indicate Requirement Levels . March 1997. Best Current Practice. URL: https://datatracker.ietf.org/doc/html/rfc2119 [SELECTORS-4] Elika Etemad; Tab Atkins Jr.. Selectors Level 4 . 22 January 2026. WD. URL: https://www.w3.org/TR/selectors-4/ [URL] Anne van Kesteren. URL Standard . Living Standard. URL: https://url.spec.whatwg.org/ Non-Normative References [CSS-COLOR-4] Tab Atkins Jr.; Chris Lilley; Lea Verou. CSS Color Module Level 4 . 18 June 2026. CRD. URL: https://www.w3.org/TR/css-color-4/ Property Index Name Value Initial Applies to Inh. %ages Animation type Canonical order Computed value link-parameters none | <param()># none all elements and pseudo-elements no n/a discrete per grammar as specified