pub struct ResolveValuesParams {
pub values: Vec<String>,
pub node_id: NodeId,
pub property_name: Option<String>,
pub pseudo_type: Option<PseudoType>,
pub pseudo_identifier: Option<String>,
}Expand description
Resolve the specified values in the context of the provided element.
For example, a value of ‘1em’ is evaluated according to the computed
‘font-size’ of the element and a value ‘calc(1px + 2px)’ will be
resolved to ‘3px’.
If the propertyName was specified the values are resolved as if
they were property’s declaration. If a value cannot be parsed according
to the provided property syntax, the value is parsed using combined
syntax as if null propertyName was provided. If the value cannot be
resolved even then, return the provided value without any changes.
Note: this function currently does not resolve CSS random() function,
it returns unmodified random() function parts.`
resolveValues
Fields§
§values: Vec<String>Cascade-dependent keywords (revert/revert-layer) do not work.
node_id: NodeIdId of the node in whose context the expression is evaluated
property_name: Option<String>Only longhands and custom property names are accepted.
pseudo_type: Option<PseudoType>Pseudo element type, only works for pseudo elements that generate elements in the tree, such as ::before and ::after.
pseudo_identifier: Option<String>Pseudo element custom ident.
Implementations§
Trait Implementations§
Source§impl Clone for ResolveValuesParams
impl Clone for ResolveValuesParams
Source§fn clone(&self) -> ResolveValuesParams
fn clone(&self) -> ResolveValuesParams
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more