Module position

Source
Expand description

Generic types for CSS handling of specified and computed values of position

Re-exports§

pub use self::GenericPosition as Position;
pub use self::GenericPositionOrAuto as PositionOrAuto;
pub use self::GenericZIndex as ZIndex;
pub use self::GenericAspectRatio as AspectRatio;
pub use self::GenericInset as Inset;

Structs§

GenericAnchorFunction
Anchor function used by inset properties. This resolves to length at computed time.
GenericAspectRatio
A generic value for the aspect-ratio property, the value is auto || <ratio>.
GenericPosition
A generic type for representing a CSS position.

Enums§

AnchorSideKeyword
Keyword values for the anchor positioning function.
GenericAnchorSide
Anchor side for the anchor positioning function.
GenericInset
Specified type for inset properties, which allows the use of the anchor() function. Note(dshin): LengthPercentageOrAuto is not used here because having LengthPercentageOrAuto and AnchorFunction in the enum pays the price of the discriminator for LengthPercentage | Auto as well as LengthPercentageOrAuto | AnchorFunction. This increases the size of the style struct, which would not be great. On the other hand, we trade for code duplication, so… :(
GenericPositionOrAuto
A generic type for representing an Auto | <position>. This is used by for now. https://drafts.fxtf.org/motion-1/#offset-anchor-property
GenericZIndex
A generic value for the z-index property.
PreferredRatio
Ratio or None.

Traits§

PositionComponent
Implements a method that checks if the position is centered.