mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Serialization differences with "columns" with one or more auto
value
Differential Revision: https://phabricator.services.mozilla.com/D166087
This commit is contained in:
parent
2edc1139b6
commit
e38d2369c5
1 changed files with 14 additions and 1 deletions
|
@ -8,7 +8,6 @@
|
||||||
engines="gecko servo"
|
engines="gecko servo"
|
||||||
sub_properties="column-width column-count"
|
sub_properties="column-width column-count"
|
||||||
servo_pref="layout.columns.enabled"
|
servo_pref="layout.columns.enabled"
|
||||||
derive_serialize="True"
|
|
||||||
spec="https://drafts.csswg.org/css-multicol/#propdef-columns">
|
spec="https://drafts.csswg.org/css-multicol/#propdef-columns">
|
||||||
use crate::properties::longhands::{column_count, column_width};
|
use crate::properties::longhands::{column_count, column_width};
|
||||||
|
|
||||||
|
@ -54,6 +53,20 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<'a> ToCss for LonghandsToSerialize<'a> {
|
||||||
|
fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
|
||||||
|
if self.column_width.is_auto() {
|
||||||
|
return self.column_count.to_css(dest)
|
||||||
|
}
|
||||||
|
self.column_width.to_css(dest)?;
|
||||||
|
if !self.column_count.is_auto() {
|
||||||
|
dest.write_char(' ')?;
|
||||||
|
self.column_count.to_css(dest)?;
|
||||||
|
}
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
}
|
||||||
</%helpers:shorthand>
|
</%helpers:shorthand>
|
||||||
|
|
||||||
<%helpers:shorthand
|
<%helpers:shorthand
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue