Type Alias style::values::specified::position::Position

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

The specified value of a CSS <position>

Aliased Type§

struct Position {
    pub horizontal: PositionComponent<HorizontalPositionKeyword>,
    pub vertical: PositionComponent<VerticalPositionKeyword>,
}

Fields§

§horizontal: PositionComponent<HorizontalPositionKeyword>

The horizontal component of position.

§vertical: PositionComponent<VerticalPositionKeyword>

The vertical component of position.

Implementations§

source§

impl Position

source

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

Parses a <bg-position>, with quirks.

source

pub fn center() -> Self

center center

source

fn is_three_value_syntax(&self) -> bool

Returns true if this uses a 3 value syntax.

Trait Implementations§

source§

impl Parse for Position

source§

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

Parse a value of this type. Read more
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