Struct style::values::computed::length::CalcLengthOrPercentage [] [src]

pub struct CalcLengthOrPercentage {
    pub clamping_mode: AllowedNumericType,
    pub percentage: Option<Percentage>,
    // some fields omitted
}

Fields

Methods

impl CalcLengthOrPercentage
[src]

[src]

Returns a new CalcLengthOrPercentage.

[src]

Returns a new CalcLengthOrPercentage with a specific clamping mode.

[src]

Returns this calc() as a <length>.

Panics in debug mode if a percentage is present in the expression.

[src]

Returns the length component of this calc()

[src]

Returns the <length> component of this calc(), unclamped.

[src]

Return the percentage value as CSSFloat.

[src]

Convert the computed value into used value.

[src]

If there are special rules for computing percentages in a value (e.g. the height property), they apply whenever a calc() expression contains percentages.

Trait Implementations

impl Clone for CalcLengthOrPercentage
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for CalcLengthOrPercentage
[src]

impl Debug for CalcLengthOrPercentage
[src]

[src]

Formats the value using the given formatter. Read more

impl MallocSizeOf for CalcLengthOrPercentage
[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 CalcLengthOrPercentage
[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 ToAnimatedZero for CalcLengthOrPercentage
[src]

[src]

Returns a value that, when added with an underlying value, will produce the underlying value. This is used for SMIL animation's "by-animation" where SMIL first interpolates from the zero value to the 'by' value, and then adds the result to the underlying value. Read more

impl ComputeSquaredDistance for CalcLengthOrPercentage
[src]

[src]

Computes the squared distance between two animatable values.

impl From<LengthOrPercentage> for CalcLengthOrPercentage
[src]

[src]

Performs the conversion.

impl ToCss for CalcLengthOrPercentage
[src]

[src]

Serialize self in CSS syntax, writing to dest.

[src]

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

impl Animate for CalcLengthOrPercentage
[src]

https://drafts.csswg.org/css-transitions/#animtype-lpcalc

[src]

Animate a value towards another one, given an animation procedure.