Skip to content

Commit

Permalink
style: Support unprefixed min-content and max-content.
Browse files Browse the repository at this point in the history
Support unprefixed min-content and max-content and treat the prefixed
version as aliases for
1. width, min-width, max-width if inline-axis is horizontal, and
2. height, min-height, max-height if inline-axis is vertical, and
3. inline-size, min-inline-size, max-inline-size, and
4. flex-basis.

Besides, update the test cases to use unprefixed max-content and
min-content.

Differential Revision: https://phabricator.services.mozilla.com/D7536
  • Loading branch information
BorisChiou authored and emilio committed Jan 6, 2019
1 parent 3ed525f commit b7e728a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions components/style/values/computed/length.rs
Expand Up @@ -985,8 +985,10 @@ pub type NonNegativeLengthOrPercentageOrNormal = Either<NonNegativeLengthOrPerce
)]
#[repr(u8)]
pub enum ExtremumLength {
MozMaxContent,
MozMinContent,
#[parse(aliases = "-moz-max-content")]
MaxContent,
#[parse(aliases = "-moz-min-content")]
MinContent,
MozFitContent,
MozAvailable,
}
Expand Down

0 comments on commit b7e728a

Please sign in to comment.