pub trait ToPercentage {
    // Required method
    fn to_percentage(&self) -> CSSFloat;

    // Provided method
    fn is_calc(&self) -> bool { ... }
}
Expand description

Turns the percentage into a plain float.

Required Methods§

source

fn to_percentage(&self) -> CSSFloat

Turns the percentage into a plain float.

Provided Methods§

source

fn is_calc(&self) -> bool

Returns whether this percentage used to be a calc().

Implementors§

source§

impl ToPercentage for style::values::computed::percentage::Percentage

source§

impl ToPercentage for style::values::specified::percentage::Percentage