mirror of
https://github.com/servo/servo.git
synced 2025-06-24 00:54:32 +01:00
style: Make numbers keep track of whether they were specified as calc().
This commit is contained in:
parent
c20bbb920c
commit
c7ce2ff483
9 changed files with 271 additions and 119 deletions
|
@ -573,15 +573,14 @@ mod shorthand_serialization {
|
|||
|
||||
#[test]
|
||||
fn flex_should_serialize_all_available_properties() {
|
||||
use style::values::specified::Number as NumberContainer;
|
||||
use style::values::specified::Percentage as PercentageContainer;
|
||||
use style::values::specified::{Number, Percentage};
|
||||
|
||||
let mut properties = Vec::new();
|
||||
|
||||
let grow = NumberContainer(2f32);
|
||||
let shrink = NumberContainer(3f32);
|
||||
let grow = Number::new(2f32);
|
||||
let shrink = Number::new(3f32);
|
||||
let basis =
|
||||
LengthOrPercentageOrAutoOrContent::Percentage(PercentageContainer(0.5f32));
|
||||
LengthOrPercentageOrAutoOrContent::Percentage(Percentage(0.5f32));
|
||||
|
||||
properties.push(PropertyDeclaration::FlexGrow(grow));
|
||||
properties.push(PropertyDeclaration::FlexShrink(shrink));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue