mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Use rust types for background-size.
Hopefully straight-forward. Differential Revision: https://phabricator.services.mozilla.com/D19625
This commit is contained in:
parent
1e6338e1ee
commit
07cb325402
6 changed files with 27 additions and 137 deletions
|
@ -6,19 +6,8 @@
|
|||
|
||||
use crate::values::computed::length::NonNegativeLengthPercentage;
|
||||
use crate::values::generics::background::BackgroundSize as GenericBackgroundSize;
|
||||
use crate::values::generics::length::LengthPercentageOrAuto;
|
||||
|
||||
pub use crate::values::specified::background::BackgroundRepeat;
|
||||
|
||||
/// A computed value for the `background-size` property.
|
||||
pub type BackgroundSize = GenericBackgroundSize<NonNegativeLengthPercentage>;
|
||||
|
||||
impl BackgroundSize {
|
||||
/// Returns `auto auto`.
|
||||
pub fn auto() -> Self {
|
||||
GenericBackgroundSize::Explicit {
|
||||
width: LengthPercentageOrAuto::auto(),
|
||||
height: LengthPercentageOrAuto::auto(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue