pub type AspectRatio = AspectRatio<NonNegativeNumber>;
Expand description

A specified value for the aspect-ratio property.

Aliased Type§

struct AspectRatio {
    pub auto: bool,
    pub ratio: PreferredRatio<NonNegative<Number>>,
}

Fields§

§auto: bool

Specifiy auto or not.

§ratio: PreferredRatio<NonNegative<Number>>

The preferred aspect-ratio value.

Implementations§

source§

impl AspectRatio

source

pub fn from_mapped_ratio(w: f32, h: f32) -> Self

Returns Self by a valid ratio.

Trait Implementations§

source§

impl Parse for AspectRatio

source§

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

Parse a value of this type. Read more