Enum style::values::computed::length::LengthOrPercentage [] [src]

pub enum LengthOrPercentage {
    Length(Length),
    Percentage(Percentage),
    Calc(CalcLengthOrPercentage),
}

Variants

Methods

impl LengthOrPercentage
[src]

[src]

[src]

1px length value for SVG defaults

[src]

Returns true if the computed value is absolute 0 or 0%.

(Returns false for calc() values, even if ones that may resolve to zero.)

[src]

[src]

Returns the used value.

[src]

Returns the used value as CSSPixelLength.

[src]

Returns the clamped non-negative values.

Trait Implementations

impl From<LengthOrPercentage> for CalcLengthOrPercentage
[src]

[src]

Performs the conversion.

impl Animate for LengthOrPercentage
[src]

[src]

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

impl Clone for LengthOrPercentage
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl ComputeSquaredDistance for LengthOrPercentage
[src]

[src]

Computes the squared distance between two animatable values.

impl Copy for LengthOrPercentage
[src]

impl MallocSizeOf for LengthOrPercentage
[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 LengthOrPercentage
[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 LengthOrPercentage
[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 ToCss for LengthOrPercentage
[src]

[src]

Serialize self in CSS syntax, writing to dest.

[src]

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

impl Debug for LengthOrPercentage
[src]

[src]

Formats the value using the given formatter. Read more

impl From<Au> for LengthOrPercentage
[src]

[src]

Performs the conversion.

impl From<LengthOrPercentage> for NonNegativeLengthOrPercentage
[src]

[src]

Performs the conversion.

impl From<NonNegativeLengthOrPercentage> for LengthOrPercentage
[src]

[src]

Performs the conversion.

impl ToAbsoluteLength for ComputedLengthOrPercentage
[src]

[src]

Returns the absolute length as pixel value.

impl RepeatableListAnimatable for LengthOrPercentage
[src]

impl From<LengthOrPercentage> for NumberOrPercentage
[src]

[src]

Performs the conversion.