style: Implement css(dimension) and derive ToCss for a bunch of stuff.

For css(dimension), it'd be nice to derive(Parse) too, I think...
This commit is contained in:
Emilio Cobos Álvarez 2017-11-11 14:57:12 +01:00
parent 1b533f9bdc
commit 4927786d90
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
10 changed files with 98 additions and 153 deletions

View file

@ -1315,14 +1315,14 @@ impl FragmentDisplayListBuilding for Fragment {
LineDirection::Angle(angle) => angle.radians(),
LineDirection::Horizontal(x) => {
match x {
X::Left => Angle::Degree(270.).radians(),
X::Right => Angle::Degree(90.).radians(),
X::Left => Angle::Deg(270.).radians(),
X::Right => Angle::Deg(90.).radians(),
}
},
LineDirection::Vertical(y) => {
match y {
Y::Top => Angle::Degree(0.).radians(),
Y::Bottom => Angle::Degree(180.).radians(),
Y::Top => Angle::Deg(0.).radians(),
Y::Bottom => Angle::Deg(180.).radians(),
}
},
LineDirection::Corner(horizontal, vertical) => {