mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Make additional properties be reset by the 'font' shorthand.
A number of properties are supposed to be reset to initial values by the 'font' shorthand. This does so for all such properties that Servo currently supports (conditional on when they're supported). Fixes #15033.
This commit is contained in:
parent
166b304840
commit
7a65a472a2
1 changed files with 16 additions and 2 deletions
|
@ -5,7 +5,12 @@
|
|||
<%namespace name="helpers" file="/helpers.mako.rs" />
|
||||
|
||||
<%helpers:shorthand name="font" sub_properties="font-style font-variant font-weight font-stretch
|
||||
font-size line-height font-family"
|
||||
font-size line-height font-family
|
||||
${'font-size-adjust' if product == 'gecko' else ''}
|
||||
${'font-kerning' if product == 'gecko' else ''}
|
||||
${'font-variant-caps' if product == 'gecko' else ''}
|
||||
${'font-variant-position' if product == 'gecko' else ''}
|
||||
${'font-language-override' if product == 'none' else ''}"
|
||||
spec="https://drafts.csswg.org/css-fonts-3/#propdef-font">
|
||||
use properties::longhands::{font_style, font_variant, font_weight, font_stretch};
|
||||
use properties::longhands::{font_size, line_height, font_family};
|
||||
|
@ -72,7 +77,16 @@
|
|||
font_stretch: stretch,
|
||||
font_size: size,
|
||||
line_height: line_height,
|
||||
font_family: Some(font_family::SpecifiedValue(family))
|
||||
font_family: Some(font_family::SpecifiedValue(family)),
|
||||
% if product == "gecko":
|
||||
font_size_adjust: None,
|
||||
font_kerning: None,
|
||||
font_variant_caps: None,
|
||||
font_variant_position: None,
|
||||
% endif
|
||||
% if product == "none":
|
||||
font_language_override: None,
|
||||
% endif
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue