Implement HorizontalPosition / VerticalPosition

This commit is contained in:
Nazım Can Altınova 2016-12-09 00:49:49 +03:00
parent 872ec89a9c
commit a409d41d1d
6 changed files with 513 additions and 181 deletions

View file

@ -26,3 +26,19 @@ impl ToCss for Position {
Ok(())
}
}
pub struct HorizontalPosition(pub LengthOrPercentage);
impl ToCss for HorizontalPosition {
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
self.0.to_css(dest)
}
}
pub struct VerticalPosition(pub LengthOrPercentage);
impl ToCss for VerticalPosition {
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
self.0.to_css(dest)
}
}