mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Implement HorizontalPosition / VerticalPosition
This commit is contained in:
parent
872ec89a9c
commit
a409d41d1d
6 changed files with 513 additions and 181 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue