Skip to main content

Module custom_properties

Module custom_properties 

Source
Expand description

Macrosยง

lnf_int ๐Ÿ”’
lnf_int_variable ๐Ÿ”’
make_variable ๐Ÿ”’

Structsยง

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.
AttributeData
Data specific to an attr() call like type and namespace.
ComputedCustomProperties
A pair of separate CustomPropertiesMaps, split between custom properties that have the inherit flag set and those with the flag unset.
ComputedSubstitutionFunctions
A wrapper map that encapsulates both the custom properties and attributes for a given element.
CssEnvironment
The environment from which to get env function values.
EnvironmentVariable ๐Ÿ”’
NonCustomReferenceMap
A map from NonCustomReferenceMap to a T.
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 ๐Ÿ”’
SubstitutionFunctionReference
A reference to a substitution function like env() / var() / attr().
SubstitutionResult
Result of var(), env(), and attr() substitution.
VariableFallback
The fallback of a particular value.
VariableValue
A value for a custom property is just a set of tokens.

Enumsยง

AttributeType ๐Ÿ”’
SingleNonCustomReference
A non-custom reference that participates in cycle resolution. TODO(emilio): This should probably eventually become just PrioritaryPropertyId.
SubstitutionFunctionKind
Substitution function source: var, env, attr.

Staticsยง

CHROME_ENVIRONMENT_VARIABLES ๐Ÿ”’
ENVIRONMENT_VARIABLES ๐Ÿ”’

Functionsยง

compute_value ๐Ÿ”’
compute_variable_value ๐Ÿ”’
Given a potentially registered variable value turn it into a computed custom property value.
do_substitute_chunk ๐Ÿ”’
eval_gtk_csd_titlebar_radius ๐Ÿ”’
get_attr_value_for_cycle_resolution
Attribute values may reference other substitution functions we may need to process. See step 6: https://drafts.csswg.org/css-values-5/#attr-substitution
get_content_preferred_color_scheme ๐Ÿ”’
get_hairline ๐Ÿ”’
get_safearea_inset_bottom ๐Ÿ”’
get_safearea_inset_left ๐Ÿ”’
get_safearea_inset_right ๐Ÿ”’
get_safearea_inset_top ๐Ÿ”’
get_scrollbar_inline_size ๐Ÿ”’
handle_invalid_at_computed_value_time
See https://drafts.csswg.org/css-variables-2/#invalid-at-computed-value-time
parse_attr_type ๐Ÿ”’
Parse = type( ) | raw-string | number | . https://drafts.csswg.org/css-values-5/#attr-notation
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_name
Parse a custom property name.
quoted_css_string ๐Ÿ”’
reify_variable_value ๐Ÿ”’
reify_variable_value_range ๐Ÿ”’
Reify a slice of the CSS string into UnparsedSegment entries.
remove_and_insert_initial_value ๐Ÿ”’
Removes the named registered custom property and inserts its uncomputed initial value.
substitute
Replace var(), env(), and attr() functions, returning the resulting CSS string.
substitute_internal ๐Ÿ”’
Replace var(), env(), and attr() functions. Return Err(..) for invalid at computed time.
substitute_one_reference ๐Ÿ”’
substitute_references_if_needed_and_apply
Replace var(), env(), and attr() functions in a pre-existing variable value.

Type Aliasesยง

ComputedValue
Both specified and computed values are VariableValues, the difference is whether var() functions are expanded.
EnvironmentEvaluator ๐Ÿ”’
Name
A custom property name is just an Atom.
SpecifiedValue
Both specified and computed values are VariableValues, the difference is whether var() functions are expanded.