mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
style: Use Au::abs.
This commit is contained in:
parent
7bf1748c34
commit
6df597b0b8
2 changed files with 4 additions and 7 deletions
|
@ -206,11 +206,8 @@ impl ToCss for CalcLengthOrPercentage {
|
|||
percentage.to_css(dest)?;
|
||||
|
||||
dest.write_str(if length < Zero::zero() { " - " } else { " + " })?;
|
||||
length.abs().to_css(dest)?;
|
||||
|
||||
// FIXME(emilio): Au::abs would be nice.
|
||||
let length = if length < Zero::zero() { -length } else { length };
|
||||
|
||||
length.to_css(dest)?;
|
||||
dest.write_str(")")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue