mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Use off/- instead of 0/1 when serializing
This commit is contained in:
parent
f33388fde3
commit
d6fa6e453a
2 changed files with 9 additions and 6 deletions
|
@ -411,7 +411,11 @@ ${helpers.single_keyword("font-variant-position",
|
|||
|
||||
impl ToCss for FeatureTagValue {
|
||||
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
|
||||
let s = format!("\"{}\" {}", self.tag, self.value);
|
||||
let s = match self.value {
|
||||
1 => format!("\"{}\"", self.tag),
|
||||
0 => format!("\"{}\" off", self.tag),
|
||||
x => format!("\"{}\" {}", self.tag, x)
|
||||
};
|
||||
dest.write_str(&s)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue