mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +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
|
@ -21,7 +21,7 @@ use style_traits::{PARSING_MODE_DEFAULT, ToCss, ParseError, StyleParseError};
|
|||
use style_traits::PropertyDeclarationParseError;
|
||||
use stylesheets::{CssRuleType, StylesheetContents};
|
||||
use stylesheets::rule_parser::VendorPrefix;
|
||||
use values::KeyframesName;
|
||||
use values::{KeyframesName, serialize_percentage};
|
||||
|
||||
/// A [`@keyframes`][keyframes] rule.
|
||||
///
|
||||
|
@ -115,7 +115,7 @@ impl ::std::cmp::Eq for KeyframePercentage { }
|
|||
|
||||
impl ToCss for KeyframePercentage {
|
||||
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
|
||||
write!(dest, "{}%", self.0 * 100.0)
|
||||
serialize_percentage(self.0, dest)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue