style: Part 2: Support fit-content() in style

Support fit-content for preferred size, min size, and max size. This
patch only implement the style system. For layout part, we will do that
in the following patches.

Differential Revision: https://phabricator.services.mozilla.com/D107161
This commit is contained in:
Boris Chiou 2023-05-21 22:29:27 +02:00 committed by Oriol Brufau
parent 77cab0edc3
commit d103785c4b
3 changed files with 34 additions and 1 deletions

View file

@ -161,6 +161,9 @@ pub enum GenericSize<LengthPercent> {
#[cfg(feature = "gecko")]
#[animation(error)]
MozAvailable,
#[animation(error)]
#[css(function = "fit-content")]
FitContentFunction(LengthPercent)
}
pub use self::GenericSize as Size;
@ -215,6 +218,9 @@ pub enum GenericMaxSize<LengthPercent> {
#[cfg(feature = "gecko")]
#[animation(error)]
MozAvailable,
#[animation(error)]
#[css(function = "fit-content")]
FitContentFunction(LengthPercent),
}
pub use self::GenericMaxSize as MaxSize;