mirror of
https://github.com/servo/servo.git
synced 2025-08-28 08:38:20 +01:00
Bug 1374233 - Part 7: Add NonNegativeLengthOrPercentage.
For padding-{*} and grid-{*}-gap. MozReview-Commit-ID: 81G0b1k6JnD
This commit is contained in:
parent
9d69cb2866
commit
e72a0f126e
14 changed files with 123 additions and 20 deletions
|
@ -268,10 +268,12 @@ mod shorthand_serialization {
|
|||
|
||||
#[test]
|
||||
fn padding_should_serialize_correctly() {
|
||||
use style::values::specified::NonNegativeLengthOrPercentage;
|
||||
|
||||
let mut properties = Vec::new();
|
||||
|
||||
let px_10 = LengthOrPercentage::Length(NoCalcLength::from_px(10f32));
|
||||
let px_15 = LengthOrPercentage::Length(NoCalcLength::from_px(15f32));
|
||||
let px_10: NonNegativeLengthOrPercentage = NoCalcLength::from_px(10f32).into();
|
||||
let px_15: NonNegativeLengthOrPercentage = NoCalcLength::from_px(15f32).into();
|
||||
properties.push(PropertyDeclaration::PaddingTop(px_10.clone()));
|
||||
properties.push(PropertyDeclaration::PaddingRight(px_15.clone()));
|
||||
properties.push(PropertyDeclaration::PaddingBottom(px_10));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue