Skip to content

Commit

Permalink
style: [cssom][css-grid] 'grid-auto-flow: row dense' should serialize…
Browse files Browse the repository at this point in the history
… to 'dense' since 'row' is implied.

Differential Revision: https://phabricator.services.mozilla.com/D28058
  • Loading branch information
Mats Palmgren authored and emilio committed May 7, 2019
1 parent 477bda8 commit 098eb30
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions components/style/values/specified/position.rs
Expand Up @@ -460,6 +460,11 @@ pub enum AutoFlow {
Column,
}

/// If `dense` is specified, `row` is implied.
fn is_row_dense(autoflow: &AutoFlow, dense: &bool) -> bool {
*autoflow == AutoFlow::Row && *dense
}

#[derive(
Clone,
Copy,
Expand All @@ -477,6 +482,7 @@ pub enum AutoFlow {
/// 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
#[css(contextual_skip_if = "is_row_dense")]
pub autoflow: AutoFlow,
/// Specify use `dense` packing algorithm or not
#[css(represents_keyword)]
Expand Down

0 comments on commit 098eb30

Please sign in to comment.