mirror of
https://github.com/servo/servo.git
synced 2025-08-13 09:25:32 +01:00
style: Have Parse derive respect #[css(skip)] on variant as well and derive Parse for KeywordSize.
Bug: 1434130 Reviewed-by: emilio MozReview-Commit-ID: evSvk1RQGe
This commit is contained in:
parent
185e4ce61d
commit
43bb6364f6
3 changed files with 7 additions and 17 deletions
|
@ -715,21 +715,6 @@ impl KeywordInfo {
|
|||
}
|
||||
}
|
||||
|
||||
impl KeywordSize {
|
||||
/// Parses a keyword size.
|
||||
pub fn parse<'i, 't>(input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> {
|
||||
try_match_ident_ignore_ascii_case! { input,
|
||||
"xx-small" => Ok(KeywordSize::XXSmall),
|
||||
"x-small" => Ok(KeywordSize::XSmall),
|
||||
"small" => Ok(KeywordSize::Small),
|
||||
"medium" => Ok(KeywordSize::Medium),
|
||||
"large" => Ok(KeywordSize::Large),
|
||||
"x-large" => Ok(KeywordSize::XLarge),
|
||||
"xx-large" => Ok(KeywordSize::XXLarge),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// This is the ratio applied for font-size: larger
|
||||
/// and smaller by both Firefox and Chrome
|
||||
const LARGER_FONT_SIZE_RATIO: f32 = 1.2;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue