Type Alias style::values::specified::font::SpecifiedFontStyle

source ·
pub type SpecifiedFontStyle = FontStyle<Angle>;
Expand description

The specified value of the font-style property, without the system font crap.

Aliased Type§

enum SpecifiedFontStyle {
    Normal,
    Italic,
    Oblique(Angle),
}

Variants§

§

Normal

§

Italic

§

Oblique(Angle)

Implementations§

source§

impl SpecifiedFontStyle

source

pub fn compute_angle_degrees(angle: &Angle) -> f32

Gets a clamped angle in degrees from a specified Angle.

source

pub fn parse_angle<'i, 't>( context: &ParserContext<'_>, input: &mut Parser<'i, 't>, ) -> Result<Angle, ParseError<'i>>

Parse a suitable angle for font-style: oblique.

source

pub fn default_angle() -> Angle

The default angle for font-style: oblique.

Trait Implementations§

source§

impl Parse for SpecifiedFontStyle

source§

fn parse<'i, 't>( context: &ParserContext<'_>, input: &mut Parser<'i, 't>, ) -> Result<Self, ParseError<'i>>

Parse a value of this type. Read more
source§

impl ToComputedValue for SpecifiedFontStyle

§

type ComputedValue = FontStyle

The computed value type we’re going to be converted to.
source§

fn to_computed_value(&self, _: &Context<'_>) -> Self::ComputedValue

Convert a specified value to a computed value, using itself and the data inside the Context.
source§

fn from_computed_value(computed: &Self::ComputedValue) -> Self

Convert a computed value to specified value form. Read more
source§

impl ToCss for SpecifiedFontStyle

source§

fn to_css<W>(&self, dest: &mut CssWriter<'_, W>) -> Result
where W: Write,

Serialize self in CSS syntax, writing to dest.
source§

fn to_css_string(&self) -> String

Serialize self in CSS syntax and return a string. Read more