Type Alias style::properties_and_values::value::SpecifiedValue
source · pub type SpecifiedValue = Value<SpecifiedValueComponent>;
Expand description
Specified custom property value.
Aliased Type§
struct SpecifiedValue {
pub(crate) v: ValueInner<GenericValueComponent<Length, Number, Percentage, LengthPercentage, Color, GenericImage<GenericGradient<LineDirection, LengthPercentage, NonNegative<Length>, NonNegative<LengthPercentage>, GenericPosition<PositionComponent<HorizontalPositionKeyword>, PositionComponent<VerticalPositionKeyword>>, Angle, AngleOrPercentage, Color>, CssUrl, Color, Percentage, Resolution>, CssUrl, Integer, Angle, Time, Resolution, GenericTransform<GenericTransformOperation<Angle, Number, Length, Integer, LengthPercentage>>>>,
url_data: UrlExtraData,
}
Fields§
§v: ValueInner<GenericValueComponent<Length, Number, Percentage, LengthPercentage, Color, GenericImage<GenericGradient<LineDirection, LengthPercentage, NonNegative<Length>, NonNegative<LengthPercentage>, GenericPosition<PositionComponent<HorizontalPositionKeyword>, PositionComponent<VerticalPositionKeyword>>, Angle, AngleOrPercentage, Color>, CssUrl, Color, Percentage, Resolution>, CssUrl, Integer, Angle, Time, Resolution, GenericTransform<GenericTransformOperation<Angle, Number, Length, Integer, LengthPercentage>>>>
The registered custom property value.
url_data: UrlExtraData
The URL data of the registered custom property from before it was computed. This is necessary to uncompute registered custom properties.
Implementations§
source§impl SpecifiedValue
impl SpecifiedValue
sourcepub fn compute<'i, 't>(
input: &mut CSSParser<'i, 't>,
registration: &PropertyRegistrationData,
url_data: &UrlExtraData,
context: &Context<'_>,
allow_computationally_dependent: AllowComputationallyDependent,
) -> Result<ComputedValue, ()>
pub fn compute<'i, 't>( input: &mut CSSParser<'i, 't>, registration: &PropertyRegistrationData, url_data: &UrlExtraData, context: &Context<'_>, allow_computationally_dependent: AllowComputationallyDependent, ) -> Result<ComputedValue, ()>
Convert a registered custom property to a Computed custom property value, given input and a property registration.
sourcepub fn parse<'i, 't>(
input: &mut CSSParser<'i, 't>,
syntax: &Descriptor,
url_data: &UrlExtraData,
allow_computationally_dependent: AllowComputationallyDependent,
) -> Result<Self, StyleParseError<'i>>
pub fn parse<'i, 't>( input: &mut CSSParser<'i, 't>, syntax: &Descriptor, url_data: &UrlExtraData, allow_computationally_dependent: AllowComputationallyDependent, ) -> Result<Self, StyleParseError<'i>>
Parse and validate a registered custom property value according to its syntax descriptor, and check for computational independence.