style: Move represents_keyword to the css attributes.

Bug: 1457635
Reviewed-by: xidorn
MozReview-Commit-ID: 21yuU4h34AQ
This commit is contained in:
Emilio Cobos Álvarez 2018-04-29 04:48:47 +02:00
parent a375baf84b
commit c508d8576d
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
8 changed files with 24 additions and 69 deletions

View file

@ -424,14 +424,14 @@ pub enum AutoFlow {
}
#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, PartialEq, SpecifiedValueInfo,
ToComputedValue)]
ToComputedValue, ToCss)]
/// Controls how the auto-placement algorithm works
/// specifying exactly how auto-placed items get flowed into the grid
pub struct GridAutoFlow {
/// Specifiy how auto-placement algorithm fills each `row` or `column` in turn
pub autoflow: AutoFlow,
/// Specify use `dense` packing algorithm or not
#[value_info(represents_keyword)]
#[css(represents_keyword)]
pub dense: bool,
}
@ -446,20 +446,6 @@ impl GridAutoFlow {
}
}
impl ToCss for GridAutoFlow {
fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
where
W: Write,
{
self.autoflow.to_css(dest)?;
if self.dense {
dest.write_str(" dense")?;
}
Ok(())
}
}
impl Parse for GridAutoFlow {
/// [ row | column ] || dense
fn parse<'i, 't>(