mirror of
https://github.com/servo/servo.git
synced 2025-08-08 15:05:35 +01:00
style: Skip system font variant for ToCss in font subproperties.
System font keywords are not a valid value for those properties. The newly-added #[css(skip)] would be reused by deriving algorithm of SpecifiedValueInfo to skip them as well. Bug: 1434130 Reviewed-by: emilio MozReview-Commit-ID: EmnhkaA9RR5
This commit is contained in:
parent
6e3fa68f46
commit
3b9c40dd14
4 changed files with 23 additions and 0 deletions
|
@ -78,6 +78,9 @@ fn derive_variant_arm(
|
|||
let variant_attrs = cg::parse_variant_attrs_from_ast::<CssVariantAttrs>(&ast);
|
||||
let separator = if variant_attrs.comma { ", " } else { " " };
|
||||
|
||||
if variant_attrs.skip {
|
||||
return quote!(Ok(()));
|
||||
}
|
||||
if variant_attrs.dimension {
|
||||
assert_eq!(bindings.len(), 1);
|
||||
assert!(
|
||||
|
@ -223,6 +226,7 @@ pub struct CssVariantAttrs {
|
|||
pub dimension: bool,
|
||||
pub keyword: Option<String>,
|
||||
pub aliases: Option<String>,
|
||||
pub skip: bool,
|
||||
}
|
||||
|
||||
#[darling(attributes(css), default)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue