mirror of
https://github.com/servo/servo.git
synced 2025-08-18 11:55:39 +01:00
Set flex-basis to 0% when omitted in flex shorthand.
This commit is contained in:
parent
aca09436b7
commit
acb7242304
4 changed files with 34 additions and 4 deletions
|
@ -92,7 +92,11 @@
|
|||
Ok(expanded! {
|
||||
flex_grow: grow.unwrap_or(Number::new(1.0)),
|
||||
flex_shrink: shrink.unwrap_or(Number::new(1.0)),
|
||||
flex_basis: basis.unwrap_or(longhands::flex_basis::SpecifiedValue::zero()),
|
||||
// Per spec, this should be SpecifiedValue::zero(), but all
|
||||
// browsers currently agree on using `0%`. This is a spec
|
||||
// change which hasn't been adopted by browsers:
|
||||
// https://github.com/w3c/csswg-drafts/commit/2c446befdf0f686217905bdd7c92409f6bd3921b
|
||||
flex_basis: basis.unwrap_or(longhands::flex_basis::SpecifiedValue::zero_percent()),
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue