Type Definition style::values::specified::position::LegacyPosition
[−]
[src]
type LegacyPosition = GenericPosition<LegacyHPosition, LegacyVPosition>;
The specified value of a legacy CSS <position>
Modern position syntax supports 3 and 4-value syntax. That means:
If three or four values are given, then each bottom 10px right 20px
represents a 10px
vertical
offset up from the bottom edge and a 20px
horizontal offset leftward from the right edge.
If three values are given, the missing offset is assumed to be zero.
But for some historical reasons we need to keep CSS Level 2 syntax which only supports up to
2-value. This type represents this 2-value syntax.
Methods
impl LegacyPosition
[src]
pub fn parse_quirky<'i, 't>(
context: &ParserContext,
input: &mut Parser<'i, 't>,
allow_quirks: AllowQuirks
) -> Result<Self, ParseError<'i>>
[src]
context: &ParserContext,
input: &mut Parser<'i, 't>,
allow_quirks: AllowQuirks
) -> Result<Self, ParseError<'i>>
Parses a <position>
, with quirks.
pub fn center() -> Self
[src]
center center
Trait Implementations
impl Parse for LegacyPosition
[src]
fn parse<'i, 't>(
context: &ParserContext,
input: &mut Parser<'i, 't>
) -> Result<Self, ParseError<'i>>
[src]
context: &ParserContext,
input: &mut Parser<'i, 't>
) -> Result<Self, ParseError<'i>>
Parse a value of this type. Read more