mirror of
https://github.com/servo/servo.git
synced 2025-09-07 13:38:20 +01:00
Add font-weight descriptor to @font-face
This commit is contained in:
parent
8767b0d7cc
commit
fe8f5fad16
2 changed files with 18 additions and 1 deletions
|
@ -273,6 +273,20 @@ ${helpers.single_keyword("font-variant-caps",
|
|||
}
|
||||
})
|
||||
}
|
||||
|
||||
/// Used in @font-face, where relative keywords are not allowed.
|
||||
impl Parse for computed_value::T {
|
||||
fn parse(context: &ParserContext, input: &mut Parser) -> Result<Self, ()> {
|
||||
match parse(context, input)? {
|
||||
% for weight in range(100, 901, 100):
|
||||
SpecifiedValue::Weight${weight} => Ok(computed_value::T::Weight${weight}),
|
||||
% endfor
|
||||
SpecifiedValue::Bolder |
|
||||
SpecifiedValue::Lighter => Err(())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub mod computed_value {
|
||||
use std::fmt;
|
||||
#[derive(PartialEq, Eq, Copy, Clone, Hash, Debug)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue