Module basic_shape

Source
Expand description

CSS handling for the specified value of basic-shapes

Re-exportsยง

pub use crate::values::generics::basic_shape::FillRule;

Structsยง

AllowedBasicShapes
The flags to represent which basic shapes we would like to support.
ShapeRectFunction
Defines a rectangle via insets from the top and left edges of the reference box.
Xywh
The specified value of xywh(). Defines a rectangle via offsets from the top and left edge of the reference box, and a specified width and height.

Enumsยง

BasicShapeRect
The specified value of . = <inset()> | <rect()> | <xywh()>
ShapeType
For filled shapes, we use fill-rule, and store it for path() and polygon(). For outline shapes, we should ignore fill-rule.

Functionsยง

parse_at_position ๐Ÿ”’
parse_fill_rule ๐Ÿ”’
parse_round ๐Ÿ”’
parse_shape_or_box ๐Ÿ”’
A helper for both clip-path and shape-outside parsing of shapes.
round_to_css ๐Ÿ”’

Type Aliasesยง

BasicShape
A specified basic shape.
Circle
A specified circle.
ClipPath
A specified clip-path value.
Ellipse
A specified ellipse.
InsetRect
The specified value of inset().
PathOrShapeFunction
The specified value of PathOrShapeFunction.
Polygon
The specified value of Polygon.
ShapeCommand
The specified value of ShapeCommand.
ShapeOutside
A specified shape-outside value.
ShapePosition
A specified value for at <position> in circle() and ellipse().
ShapeRadius
The specified value of ShapeRadius.