Enum style::values::specified::length::ViewportPercentageLength
[−]
[src]
pub enum ViewportPercentageLength { Vw(CSSFloat), Vh(CSSFloat), Vmin(CSSFloat), Vmax(CSSFloat), }
A viewport-relative length.
https://drafts.csswg.org/css-values/#viewport-relative-lengths
Variants
Vw(CSSFloat)
A vw unit: https://drafts.csswg.org/css-values/#vw
Vh(CSSFloat)
A vh unit: https://drafts.csswg.org/css-values/#vh
Vmin(CSSFloat)
Vmax(CSSFloat)
Methods
impl ViewportPercentageLength
[src]
pub fn to_computed_value(&self, viewport_size: Size2D<Au>) -> CSSPixelLength
[src]
Computes the given viewport-relative length for the given viewport size.
Trait Implementations
impl Clone for ViewportPercentageLength
[src]
fn clone(&self) -> ViewportPercentageLength
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for ViewportPercentageLength
[src]
impl Debug for ViewportPercentageLength
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl MallocSizeOf for ViewportPercentageLength
[src]
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
[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 ViewportPercentageLength
[src]
fn eq(&self, __arg_0: &ViewportPercentageLength) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ViewportPercentageLength) -> bool
[src]
This method tests for !=
.
impl ToCss for ViewportPercentageLength
[src]
fn to_css<W>(&self, dest: &mut W) -> Result where
W: Write,
[src]
W: Write,
Serialize self
in CSS syntax, writing to dest
.
fn to_css_string(&self) -> String
[src]
Serialize self
in CSS syntax and return a string. Read more
impl Mul<CSSFloat> for ViewportPercentageLength
[src]
type Output = ViewportPercentageLength
The resulting type after applying the *
operator.
fn mul(self, scalar: CSSFloat) -> ViewportPercentageLength
[src]
Performs the *
operation.