mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
style: [cssom][css-grid] 'grid-auto-flow: row dense' should serialize to 'dense' since 'row' is implied.
Differential Revision: https://phabricator.services.mozilla.com/D28058
This commit is contained in:
parent
477bda81d3
commit
098eb300ac
1 changed files with 6 additions and 0 deletions
|
@ -460,6 +460,11 @@ pub enum AutoFlow {
|
||||||
Column,
|
Column,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// If `dense` is specified, `row` is implied.
|
||||||
|
fn is_row_dense(autoflow: &AutoFlow, dense: &bool) -> bool {
|
||||||
|
*autoflow == AutoFlow::Row && *dense
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(
|
#[derive(
|
||||||
Clone,
|
Clone,
|
||||||
Copy,
|
Copy,
|
||||||
|
@ -477,6 +482,7 @@ pub enum AutoFlow {
|
||||||
/// specifying exactly how auto-placed items get flowed into the grid
|
/// specifying exactly how auto-placed items get flowed into the grid
|
||||||
pub struct GridAutoFlow {
|
pub struct GridAutoFlow {
|
||||||
/// Specifiy how auto-placement algorithm fills each `row` or `column` in turn
|
/// Specifiy how auto-placement algorithm fills each `row` or `column` in turn
|
||||||
|
#[css(contextual_skip_if = "is_row_dense")]
|
||||||
pub autoflow: AutoFlow,
|
pub autoflow: AutoFlow,
|
||||||
/// Specify use `dense` packing algorithm or not
|
/// Specify use `dense` packing algorithm or not
|
||||||
#[css(represents_keyword)]
|
#[css(represents_keyword)]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue