Skip to main content

Module substitution

Module substitution 

Source
Expand description

Arbitrary substitution functions. https://drafts.csswg.org/css-values-5/#arbitrary-substitution-function

Re-exports§

pub use self::attr::AttrFunction;
pub use self::env::EnvFunction;
pub use self::var::VarFunction;

Modules§

attr
The attr() arbitrary substitution function. https://drafts.csswg.org/css-values-5/#funcdef-attr
env
The env() arbitrary substitution function. https://drafts.csswg.org/css-env-1/#funcdef-env
var
The var() arbitrary substitution function. https://drafts.csswg.org/css-variables-2/#funcdef-var

Structs§

ArbitraryDeclarationValue
An arbitrary <declaration-value> nested inside of a substitution function.
AttrTaint
In CSS Values and Units, values produced by attr() are considered attr()-tainted, as are functions that contain an attr()-tainted value. Using an attr()-tainted value as or in a makes a declaration invalid at computed-value time. https://drafts.csswg.org/css-values-5/#attr-security
AttrTaintedRange
For a CSS string, the range, counted in bytes, that is attr()-tainted.
ParsedArgument
The result of substituting and parsing a SubstitutionArgument.
ReferenceFlags
Set of flags to references this custom property makes.
References
A struct holding information about the external references to that a custom property value may have.
Substitution
The result of substituting a value or a single substitution function.
SubstitutionFunctionReference
A reference to a substitution function like env() / var() / attr().
SubstitutionParserContext
Context for parsing an arbitrary substitution function.
SubstitutionReplacementContext
Context for replacing an arbitrary substitution function with its value.
SubstitutionResult
Result of var(), env(), and attr() substitution.

Enums§

SubstitutionArgument
An argument of a substitution function that is parsed as T at substitution time.
SubstitutionFunction
A substitution function along with the data specific to it.
SubstitutionFunctionKind
Substitution function name.

Functions§

parse_declaration_value
https://drafts.csswg.org/css-syntax-3/#typedef-declaration-value
parse_declaration_value_block 🔒
Like parse_declaration_value, but accept ! and ; since they are only invalid at the top level.
parse_optional_fallback 🔒
substitute
Replace var(), env(), and attr() functions, returning the resulting CSS string.