mirror of
https://github.com/servo/servo.git
synced 2025-08-12 17:05:33 +01:00
Use generics for background-size property
This commit is contained in:
parent
334d9088b8
commit
ca8fae91da
10 changed files with 187 additions and 231 deletions
|
@ -806,6 +806,7 @@ mod shorthand_serialization {
|
|||
use style::properties::longhands::mask_repeat as repeat;
|
||||
use style::properties::longhands::mask_size as size;
|
||||
use style::values::Either;
|
||||
use style::values::generics::background::BackgroundSize;
|
||||
use style::values::generics::image::Image;
|
||||
use super::*;
|
||||
|
||||
|
@ -852,13 +853,12 @@ mod shorthand_serialization {
|
|||
)
|
||||
);
|
||||
|
||||
let size = single_vec_variant_value!(size,
|
||||
size::single_value::SpecifiedValue::Explicit(
|
||||
size::single_value::ExplicitSize {
|
||||
width: LengthOrPercentageOrAuto::Length(NoCalcLength::from_px(70f32)),
|
||||
height: LengthOrPercentageOrAuto::Length(NoCalcLength::from_px(50f32))
|
||||
}
|
||||
)
|
||||
let size = single_vec_variant_value!(
|
||||
size,
|
||||
BackgroundSize::Explicit {
|
||||
width: LengthOrPercentageOrAuto::Length(NoCalcLength::from_px(70f32)),
|
||||
height: LengthOrPercentageOrAuto::Length(NoCalcLength::from_px(50f32)),
|
||||
}
|
||||
);
|
||||
|
||||
let repeat = single_vec_keyword_value!(repeat, RepeatX);
|
||||
|
@ -903,13 +903,12 @@ mod shorthand_serialization {
|
|||
PositionComponent::Length(LengthOrPercentage::Length(NoCalcLength::from_px(4f32)))
|
||||
);
|
||||
|
||||
let size = single_vec_variant_value!(size,
|
||||
size::single_value::SpecifiedValue::Explicit(
|
||||
size::single_value::ExplicitSize {
|
||||
width: LengthOrPercentageOrAuto::Length(NoCalcLength::from_px(70f32)),
|
||||
height: LengthOrPercentageOrAuto::Length(NoCalcLength::from_px(50f32))
|
||||
}
|
||||
)
|
||||
let size = single_vec_variant_value!(
|
||||
size,
|
||||
BackgroundSize::Explicit {
|
||||
width: LengthOrPercentageOrAuto::Length(NoCalcLength::from_px(70f32)),
|
||||
height: LengthOrPercentageOrAuto::Length(NoCalcLength::from_px(50f32)),
|
||||
}
|
||||
);
|
||||
|
||||
let repeat = single_vec_keyword_value!(repeat, RepeatX);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue