Type Definition style::values::computed::font::FontStyle

source ·
pub type FontStyle = FontStyle<FontStyleAngle>;
Expand description

The computed value of font-style.

FIXME(emilio): Angle should be a custom type to handle clamping during animation.

Implementations§

source§

impl FontStyle

source

pub fn normal() -> Self

The normal value.

source

pub fn default_angle() -> FontStyleAngle

The default angle for font-style: oblique. This is 20deg per spec:

https://drafts.csswg.org/css-fonts-4/#valdef-font-style-oblique-angle

Trait Implementations§

source§

impl ToCss for FontStyle

source§

fn to_css<W>(&self, dest: &mut CssWriter<'_, W>) -> Resultwhere
    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