mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
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:
parent
1b533f9bdc
commit
4927786d90
10 changed files with 98 additions and 153 deletions
|
@ -291,9 +291,9 @@ impl GeckoStyleCoordConvertible for Angle {
|
|||
|
||||
fn from_gecko_style_coord<T: CoordData>(coord: &T) -> Option<Self> {
|
||||
match coord.as_value() {
|
||||
CoordDataValue::Degree(val) => Some(Angle::Degree(val)),
|
||||
CoordDataValue::Grad(val) => Some(Angle::Gradian(val)),
|
||||
CoordDataValue::Radian(val) => Some(Angle::Radian(val)),
|
||||
CoordDataValue::Degree(val) => Some(Angle::Deg(val)),
|
||||
CoordDataValue::Grad(val) => Some(Angle::Grad(val)),
|
||||
CoordDataValue::Radian(val) => Some(Angle::Rad(val)),
|
||||
CoordDataValue::Turn(val) => Some(Angle::Turn(val)),
|
||||
_ => None,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue