Enum style::values::specified::font::FontSize [] [src]

pub enum FontSize {
    Length(LengthOrPercentage),
    Keyword(KeywordInfo),
    Smaller,
    Larger,
    System(SystemFont),
}

A specified font-size value

Variants

A length; e.g. 10px.

A keyword value, along with a ratio and absolute offset. The ratio in any specified keyword value will be 1 (with offset 0), but we cascade keywordness even after font-relative (percent and em) values have been applied, which is where the ratio comes in. The offset comes in if we cascaded a calc value, where the font-relative portion (em and percentage) will go into the ratio, and the remaining units all computed together will go into the offset. See bug 1355707.

font-size: smaller

font-size: larger

Derived from a specified system font.

Methods

impl FontSize
[src]

[src]

[src]

Compute it against a given base font size

impl FontSize
[src]

[src]

Construct a system font value.

[src]

Obtain the system font, if any

[src]

Get initial value for specified font size.

[src]

Parses a font-size, with quirks.

[src]

Cascade font-size with specified value

Trait Implementations

impl Clone for FontSize
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for FontSize
[src]

[src]

Formats the value using the given formatter. Read more

impl MallocSizeOf for FontSize
[src]

[src]

Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself. Read more

impl PartialEq for FontSize
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl ToCss for FontSize
[src]

[src]

Serialize self in CSS syntax, writing to dest.

[src]

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

impl From<LengthOrPercentage> for FontSize
[src]

[src]

Performs the conversion.

impl ToComputedValue for FontSize
[src]

The computed value type we're going to be converted to.

[src]

Convert a specified value to a computed value, using itself and the data inside the Context. Read more

[src]

Convert a computed value to specified value form. Read more

impl Parse for FontSize
[src]

[src]

| | |