Module layout_2020::taffy::stylo_taffy::convert::stylo
source Β· Expand description
Private module of type aliases so we can refer to stylo types with nicer names
Structs§
- Align
Flags πConstants shared by multiple CSS Box Alignment properties - Content
Distribution πShared value for thealign-content
andjustify-content
properties. - Display π
- Grid
Auto πFlow Controls how the auto-placement algorithm works specifying exactly how auto-placed items get flowed into the grid: [ row | column ] || dense https://drafts.csswg.org/css-grid-2/#grid-auto-flow-property - Length
Percentage πA<length-percentage>
value. This can be either a<length>
, a<percentage>
, or a combination of both viacalc()
. - NonNegative πA wrapper of Non-negative values.
- Percentage πA computed percentage.
Enums§
- BoxSizing π
- Display
Inside π - Display
Outside πDefines an elementβs display type, which consists of the two basic qualities of how an element generates boxes https://drafts.csswg.org/css-display/#propdef-display - Variants for
<grid-template-rows> | <grid-template-columns>
- Generic
Inset πSpecified type forinset
properties, which allows the use of theanchor()
function. Note(dshin):LengthPercentageOrAuto
is not used here because havingLengthPercentageOrAuto
andAnchorFunction
in the enum pays the price of the discriminator forLengthPercentage | Auto
as well asLengthPercentageOrAuto | AnchorFunction
. This increases the size of the style struct, which would not be great. On the other hand, we trade for code duplication, so⦠:( - A generic
<length-percentage>
| normal` value. - Generic
Margin πSpecified type formargin
properties, which allows the use of theanchor-size()
function. - Generic
MaxSize πA generic value for themax-width
ormax-height
property. - Generic
Size πA generic value for thewidth
,height
,min-width
, ormin-height
property. - Overflow πThe value for the
overflow-x
/overflow-y
properties. - Position π
- Preferred
Ratio πRatio or None. - Repeat
Count πThe initial argument of therepeat
function. - Track
Breadth πA track breadth for explicit grid track sizing. Itβs generic solely to avoid re-implementing it for the computed type. - Track
List πValue Track list values. Can beor - Track
Size πA<track-size>
type for explicit grid track sizing. Like<track-breadth>
, this is generic only to avoid code bloat. It only takes<length-percentage>
Type Aliases§
- Aspect
Ratio πA computed value for theaspect-ratio
property. - Gap π
- Grid
Line πThe computed value of a<grid-line>
. <grid-template-rows> | <grid-template-columns>
- Implicit
Grid πTracks The computed value of a grid<track-size>+
- Inset
Val π - Margin
Val π - MaxSize π
- Size π