Type Alias style::values::computed::position::Position

source ·
pub type Position = Position<HorizontalPosition, VerticalPosition>;
Expand description

The computed value of a CSS <position>

Aliased Type§

struct Position {
    pub horizontal: LengthPercentage,
    pub vertical: LengthPercentage,
}

Fields§

§horizontal: LengthPercentage

The horizontal component of position.

§vertical: LengthPercentage

The vertical component of position.

Implementations§

source§

impl Position

source

pub fn center() -> Self

50% 50%

source

pub fn zero() -> Self

0% 0%

Trait Implementations§

source§

impl ToCss for Position

source§

fn to_css<W>(&self, dest: &mut CssWriter<'_, W>) -> Result
where W: Write,

Serialize self in CSS syntax, writing to dest.
source§

fn to_css_string(&self) -> String

Serialize self in CSS syntax and return a string. Read more