mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Replace write! with to_css and write_str in some ToCss impls
This commit is contained in:
parent
c1b196b7cb
commit
7e92c15e00
11 changed files with 58 additions and 42 deletions
|
@ -7,7 +7,7 @@
|
|||
use properties::animated_properties::Animatable;
|
||||
use std::fmt;
|
||||
use style_traits::ToCss;
|
||||
use values::CSSFloat;
|
||||
use values::{CSSFloat, serialize_percentage};
|
||||
use values::animated::ToAnimatedZero;
|
||||
|
||||
/// A computed percentage.
|
||||
|
@ -55,6 +55,6 @@ impl ToCss for Percentage {
|
|||
where
|
||||
W: fmt::Write,
|
||||
{
|
||||
write!(dest, "{}%", self.0 * 100.)
|
||||
serialize_percentage(self.0, dest)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue