Implement viewport percentage length units ('vw', 'vh', 'vmin', 'vmax')

This commit is contained in:
James Gilbertson 2015-03-05 07:04:27 -07:00
parent 16a8047343
commit bc1c44bbc2
3 changed files with 64 additions and 0 deletions

View file

@ -34,6 +34,8 @@ impl Range<specified::Length> {
let initial_font_size = longhands::font_size::get_initial_value();
value.to_computed_value(initial_font_size, initial_font_size)
}
&specified::Length::ViewportPercentage(value) =>
value.to_computed_value(viewport_size),
_ => unreachable!()
}
};