mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
style: Move represents_keyword to the css attributes.
Bug: 1457635 Reviewed-by: xidorn MozReview-Commit-ID: 21yuU4h34AQ
This commit is contained in:
parent
a375baf84b
commit
c508d8576d
8 changed files with 24 additions and 69 deletions
|
@ -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>(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue