style: Move font-feature-settings outside of mako

This commit is contained in:
CYBAI 2017-11-20 11:26:09 +08:00
parent db5fb74a4d
commit 70033edccd
5 changed files with 91 additions and 75 deletions

View file

@ -11,6 +11,7 @@ use style_traits::ToCss;
use values::CSSFloat;
use values::animated::{ToAnimatedValue, ToAnimatedZero};
use values::computed::{Context, NonNegativeLength, ToComputedValue};
use values::generics::{FontSettings, FontSettingTagInt};
use values::specified::font as specified;
use values::specified::length::{FontBaseSize, NoCalcLength};
@ -286,6 +287,17 @@ pub type FontVariantLigatures = specified::VariantLigatures;
/// Use VariantNumeric as computed type of FontVariantNumeric
pub type FontVariantNumeric = specified::VariantNumeric;
/// Use FontSettings as computed type of FontFeatureSettings
pub type FontFeatureSettings = FontSettings<FontSettingTagInt>;
impl FontFeatureSettings {
#[inline]
/// Default value of `font-feature-settings` as `normal`
pub fn normal() -> FontFeatureSettings {
FontSettings::Normal
}
}
/// font-language-override can only have a single three-letter
/// OpenType "language system" tag, so we should be able to compute
/// it and store it as a 32-bit integer

View file

@ -38,7 +38,8 @@ pub use self::border::{BorderImageSlice, BorderImageWidth, BorderImageSideWidth}
pub use self::border::{BorderRadius, BorderCornerRadius, BorderSpacing};
pub use self::font::{FontSize, FontSizeAdjust, FontSynthesis, FontWeight, FontVariantAlternates};
pub use self::font::{FontLanguageOverride, FontVariantSettings, FontVariantEastAsian};
pub use self::font::{FontVariantLigatures, FontVariantNumeric, MozScriptLevel, MozScriptMinSize, XTextZoom};
pub use self::font::{FontVariantLigatures, FontVariantNumeric, FontFeatureSettings};
pub use self::font::{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};