pub struct ResolveValuesParams<'a> { /* private fields */ }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.’
Implementations§
Source§impl<'a> ResolveValuesParams<'a>
impl<'a> ResolveValuesParams<'a>
Sourcepub fn builder(
values: Vec<Cow<'a, str>>,
node_id: NodeId,
) -> ResolveValuesParamsBuilder<'a>
pub fn builder( values: Vec<Cow<'a, str>>, node_id: NodeId, ) -> ResolveValuesParamsBuilder<'a>
Creates a builder for this type with the required parameters:
values: Cascade-dependent keywords (revert/revert-layer) do not work.node_id: Id of the node in whose context the expression is evaluated
Sourcepub fn values(&self) -> &[Cow<'a, str>]
pub fn values(&self) -> &[Cow<'a, str>]
Cascade-dependent keywords (revert/revert-layer) do not work.
Sourcepub fn property_name(&self) -> Option<&str>
pub fn property_name(&self) -> Option<&str>
Only longhands and custom property names are accepted.
Sourcepub fn pseudo_type(&self) -> Option<&PseudoType>
pub fn pseudo_type(&self) -> Option<&PseudoType>
Pseudo element type, only works for pseudo elements that generate elements in the tree, such as ::before and ::after.
Sourcepub fn pseudo_identifier(&self) -> Option<&str>
pub fn pseudo_identifier(&self) -> Option<&str>
Pseudo element custom ident.
Trait Implementations§
Source§impl<'a> CdpCommand<'a> for ResolveValuesParams<'a>
impl<'a> CdpCommand<'a> for ResolveValuesParams<'a>
Source§impl<'a> Clone for ResolveValuesParams<'a>
impl<'a> Clone for ResolveValuesParams<'a>
Source§fn clone(&self) -> ResolveValuesParams<'a>
fn clone(&self) -> ResolveValuesParams<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more