Type Alias style::values::specified::image::ImageSetItem

source ·
pub type ImageSetItem = ImageSetItem<Image, Resolution>;
Expand description

Each of the arguments to image-set()

Aliased Type§

struct ImageSetItem {
    pub image: GenericImage<GenericGradient<LineDirection, LengthPercentage, NonNegative<Length>, NonNegative<LengthPercentage>, GenericPosition<PositionComponent<HorizontalPositionKeyword>, PositionComponent<VerticalPositionKeyword>>, Angle, AngleOrPercentage, Color>, CssUrl, Color, Percentage, Resolution>,
    pub resolution: Resolution,
    pub mime_type: OwnedStr,
    pub has_mime_type: bool,
}

Fields§

§image: GenericImage<GenericGradient<LineDirection, LengthPercentage, NonNegative<Length>, NonNegative<LengthPercentage>, GenericPosition<PositionComponent<HorizontalPositionKeyword>, PositionComponent<VerticalPositionKeyword>>, Angle, AngleOrPercentage, Color>, CssUrl, Color, Percentage, Resolution>

<image>. <string> is converted to Image::Url at parse time.

§resolution: Resolution

The <resolution>.

TODO: Skip serialization if it is 1x.

§mime_type: OwnedStr

The type(<string>) (Optional) Specify the image’s MIME type

§has_mime_type: bool

True if mime_type has been specified

Implementations§

source§

impl ImageSetItem

source

fn parse_type<'i>(p: &mut Parser<'i, '_>) -> Result<OwnedStr, ParseError<'i>>

source

fn parse<'i, 't>( context: &ParserContext<'_>, input: &mut Parser<'i, 't>, cors_mode: CorsMode, flags: ParseImageFlags, ) -> Result<Self, ParseError<'i>>