pub type Size = GenericSize<NonNegativeLengthPercentage>;
Expand description
A specified value for min-width
, min-height
, width
or height
property.
Aliased Type§
#[repr(C, u8)]pub enum Size {
LengthPercentage(NonNegative<LengthPercentage>),
Auto,
MaxContent,
MinContent,
FitContent,
WebkitFillAvailable,
Stretch,
FitContentFunction(NonNegative<LengthPercentage>),
AnchorSizeFunction(Box<GenericAnchorSizeFunction<GenericSize<NonNegative<LengthPercentage>>>>),
AnchorContainingCalcFunction(NonNegative<LengthPercentage>),
}
Variants§
LengthPercentage(NonNegative<LengthPercentage>)
Auto
MaxContent
MinContent
FitContent
WebkitFillAvailable
Stretch
FitContentFunction(NonNegative<LengthPercentage>)
AnchorSizeFunction(Box<GenericAnchorSizeFunction<GenericSize<NonNegative<LengthPercentage>>>>)
AnchorContainingCalcFunction(NonNegative<LengthPercentage>)
Implementations§
Source§impl Size
impl Size
Sourcepub fn parse_quirky<'i, 't>(
context: &ParserContext<'_>,
input: &mut Parser<'i, 't>,
allow_quirks: AllowQuirks,
) -> Result<Self, ParseError<'i>>
pub fn parse_quirky<'i, 't>( context: &ParserContext<'_>, input: &mut Parser<'i, 't>, allow_quirks: AllowQuirks, ) -> Result<Self, ParseError<'i>>
Parses, with quirks.
Sourcefn parse_quirky_internal<'i, 't>(
context: &ParserContext<'_>,
input: &mut Parser<'i, 't>,
allow_quirks: AllowQuirks,
allow_webkit_fill_available: bool,
) -> Result<Self, ParseError<'i>>
fn parse_quirky_internal<'i, 't>( context: &ParserContext<'_>, input: &mut Parser<'i, 't>, allow_quirks: AllowQuirks, allow_webkit_fill_available: bool, ) -> Result<Self, ParseError<'i>>
Parses, with quirks and configurable support for whether the ‘-webkit-fill-available’ keyword is allowed. TODO(dholbert) Fold this function into callsites in bug 1989073 when removing ‘layout.css.webkit-fill-available.all-size-properties.enabled’.
Sourcepub fn parse_size_for_width_or_height_quirky<'i, 't>(
context: &ParserContext<'_>,
input: &mut Parser<'i, 't>,
allow_quirks: AllowQuirks,
) -> Result<Self, ParseError<'i>>
pub fn parse_size_for_width_or_height_quirky<'i, 't>( context: &ParserContext<'_>, input: &mut Parser<'i, 't>, allow_quirks: AllowQuirks, ) -> Result<Self, ParseError<'i>>
Parse a size for width or height, where -webkit-fill-available support is only controlled by one pref (vs. other properties where there’s an additional pref check): TODO(dholbert) Remove this custom parse func in bug 1989073, along with ‘layout.css.webkit-fill-available.all-size-properties.enabled’.
Sourcepub fn parse_size_for_width_or_height<'i, 't>(
context: &ParserContext<'_>,
input: &mut Parser<'i, 't>,
) -> Result<Self, ParseError<'i>>
pub fn parse_size_for_width_or_height<'i, 't>( context: &ParserContext<'_>, input: &mut Parser<'i, 't>, ) -> Result<Self, ParseError<'i>>
Parse a size for width or height, where -webkit-fill-available support is only controlled by one pref (vs. other properties where there’s an additional pref check): TODO(dholbert) Remove this custom parse func in bug 1989073, along with ‘layout.css.webkit-fill-available.all-size-properties.enabled’.
Sourcepub fn zero_percent() -> Self
pub fn zero_percent() -> Self
Returns 0%
.