mirror of
https://github.com/servo/servo.git
synced 2025-08-09 07:25:35 +01:00
style: Move font-feature-settings outside of mako
This commit is contained in:
parent
db5fb74a4d
commit
70033edccd
5 changed files with 91 additions and 75 deletions
|
@ -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
|
||||
|
|
|
@ -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};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue