mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
style: Make 'font' shorthand reset the 'font-variation-settings' property.
As required by the spec: https://drafts.csswg.org/css-fonts-4/#font-prop See https://bugzilla.mozilla.org/show_bug.cgi?id=1435983 Basically, make font-variation-settings work in the same way as font-feature-settings already does.
This commit is contained in:
parent
b59a8afd0f
commit
33ead015b1
7 changed files with 86 additions and 13 deletions
|
@ -22,7 +22,7 @@ use std::str;
|
|||
use str::CssStringWriter;
|
||||
use values::computed::font::FamilyName;
|
||||
use values::generics::font::FontTag;
|
||||
use values::specified::font::{FontVariationSettings, SpecifiedFontFeatureSettings};
|
||||
use values::specified::font::{SpecifiedFontVariationSettings, SpecifiedFontFeatureSettings};
|
||||
|
||||
/// A @font-face rule
|
||||
pub type FontFaceRule = RefPtr<nsCSSFontFaceRule>;
|
||||
|
@ -74,7 +74,7 @@ impl ToNsCssValue for SpecifiedFontFeatureSettings {
|
|||
}
|
||||
}
|
||||
|
||||
impl ToNsCssValue for FontVariationSettings {
|
||||
impl ToNsCssValue for SpecifiedFontVariationSettings {
|
||||
fn convert(self, nscssvalue: &mut nsCSSValue) {
|
||||
if self.0.is_empty() {
|
||||
nscssvalue.set_normal();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue