Add shorthand parsing/serialization for grid-template

This commit is contained in:
Ravi Shankar 2017-05-23 22:12:42 +05:30
parent 7dbd17bf70
commit 7b68d8d8bf
3 changed files with 164 additions and 2 deletions

View file

@ -306,8 +306,10 @@ impl<L: ToComputedValue> ToComputedValue for TrackSize<L> {
}
}
fn concat_serialize_idents<W>(prefix: &str, suffix: &str,
slice: &[String], sep: &str, dest: &mut W) -> fmt::Result
/// Helper function for serializing identifiers with a prefix and suffix, used
/// for serializing <line-names> (in grid).
pub fn concat_serialize_idents<W>(prefix: &str, suffix: &str,
slice: &[String], sep: &str, dest: &mut W) -> fmt::Result
where W: fmt::Write
{
if let Some((ref first, rest)) = slice.split_first() {