mirror of
https://github.com/servo/servo.git
synced 2025-08-09 15:35:34 +01:00
style: Move font-variation-settings outside of mako
This commit is contained in:
parent
5f33d35cde
commit
c561c2cb9b
5 changed files with 22 additions and 26 deletions
|
@ -17,6 +17,7 @@ use std::fmt;
|
|||
use style_traits::{ToCss, StyleParseErrorKind, ParseError};
|
||||
use values::CustomIdent;
|
||||
use values::computed::{font as computed, Context, Length, NonNegativeLength, ToComputedValue};
|
||||
use values::generics::{FontSettings, FontSettingTagFloat};
|
||||
use values::specified::{AllowQuirks, LengthOrPercentage, NoCalcLength, Number};
|
||||
use values::specified::length::{AU_PER_PT, AU_PER_PX, FontBaseSize};
|
||||
|
||||
|
@ -1035,6 +1036,17 @@ impl Parse for FontLanguageOverride {
|
|||
}
|
||||
}
|
||||
|
||||
/// This property provides low-level control over OpenType or TrueType font variations.
|
||||
pub type FontVariantSettings = FontSettings<FontSettingTagFloat>;
|
||||
|
||||
impl FontVariantSettings {
|
||||
#[inline]
|
||||
/// Default value of `font-variant-settings`
|
||||
pub fn normal() -> FontVariantSettings {
|
||||
FontSettings::Normal
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, MallocSizeOf, PartialEq, ToComputedValue)]
|
||||
/// text-zoom. Enable if true, disable if false
|
||||
pub struct XTextZoom(pub bool);
|
||||
|
|
|
@ -31,7 +31,7 @@ pub use self::background::{BackgroundRepeat, BackgroundSize};
|
|||
pub use self::border::{BorderCornerRadius, BorderImageSlice, BorderImageWidth};
|
||||
pub use self::border::{BorderImageSideWidth, BorderRadius, BorderSideWidth, BorderSpacing};
|
||||
pub use self::font::{FontSize, FontSizeAdjust, FontSynthesis, FontWeight, FontVariantAlternates};
|
||||
pub use self::font::{FontLanguageOverride, MozScriptLevel, MozScriptMinSize, XTextZoom};
|
||||
pub use self::font::{FontLanguageOverride, FontVariantSettings, MozScriptLevel, MozScriptMinSize, XTextZoom};
|
||||
pub use self::box_::{AnimationIterationCount, AnimationName, ScrollSnapType, VerticalAlign};
|
||||
pub use self::color::{Color, ColorPropertyValue, RGBAColor};
|
||||
pub use self::effects::{BoxShadow, Filter, SimpleShadow};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue