mirror of
https://github.com/servo/servo.git
synced 2025-08-08 23:15:33 +01:00
style: Use Rust types for perspective and z-index.
Differential Revision: https://phabricator.services.mozilla.com/D20381
This commit is contained in:
parent
6428ed726d
commit
74d7d5bc42
8 changed files with 17 additions and 87 deletions
|
@ -731,15 +731,3 @@ impl GridTemplateAreas {
|
|||
|
||||
/// A specified value for the `z-index` property.
|
||||
pub type ZIndex = GenericZIndex<Integer>;
|
||||
|
||||
impl Parse for ZIndex {
|
||||
fn parse<'i, 't>(
|
||||
context: &ParserContext,
|
||||
input: &mut Parser<'i, 't>,
|
||||
) -> Result<Self, ParseError<'i>> {
|
||||
if input.try(|i| i.expect_ident_matching("auto")).is_ok() {
|
||||
return Ok(GenericZIndex::Auto);
|
||||
}
|
||||
Ok(GenericZIndex::Integer(Integer::parse(context, input)?))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue