Sign in

    mizchi/css/style does not have a README file

    BorderCollapse

    pub(all) enum BorderCollapse {
    Separate
    Collapse
    } derive(Eq,
    Debug
    )

    CSS border-collapse property (for tables)

    BorderStyle

    pub(all) enum BorderStyle {
    None
    Inset
    Groove
    Outset
    Ridge
    Dotted
    Dashed
    Solid
    Double
    Hidden
    } derive(Eq,
    Debug
    )

    CSS border-style values, ordered by conflict resolution priority (higher wins).
    impl Show for BorderStyle

    BorderStyle::priority

    fn BorderStyle::priority(self : BorderStyle) -> Int

    BoxShadow

    pub struct BoxShadow {
    inset : Bool
    offset_x : Double
    offset_y : Double
    blur_radius : Double
    spread_radius : Double
    color :
    Color

    } derive(Eq,
    Debug
    )

    BoxShadow::new

    fn BoxShadow::new(inset : Bool, offset_x : Double, offset_y : Double, blur_radius : Double, spread_radius : Double, color :
    Color
    ) -> BoxShadow

    BreakBefore

    pub(all) enum BreakBefore {
    Auto
    Column
    Avoid
    } derive(Eq,
    Debug
    )

    CSS break-before property (minimum subset for multicol tests).
    impl Show for BreakBefore

    BreakInside

    pub(all) enum BreakInside {
    Auto
    Avoid
    } derive(Eq,
    Debug
    )

    CSS break-inside property (minimum subset for multicol tests).
    impl Show for BreakInside

    CaptionSide

    pub(all) enum CaptionSide {
    Top
    Bottom
    } derive(Eq,
    Debug
    )

    CSS caption-side property (for table captions)
    impl Show for CaptionSide

    ClipPath

    pub(all) enum ClipPath {
    None
    Inset(Double, Double, Double, Double)
    Rect(Double, Double, Double, Double)
    Xywh(Double, Double, Double, Double)
    Circle(Double, Double, Double)
    Ellipse(Double, Double, Double, Double)
    Polygon(Array[(Double, Double)])
    } derive(Eq,
    Debug
    )

    CSS clip-path property subset used by paint and hit testing. Shape values are pixels; negative values encode percentages as fractions.

    ClipPath::none

    fn ClipPath::none() -> ClipPath

    ColumnFill

    pub(all) enum ColumnFill {
    Balance
    Auto
    } derive(Eq,
    Debug
    )

    CSS multi-column column-fill property.
    impl Show for ColumnFill

    ColumnSpan

    pub(all) enum ColumnSpan {
    None
    All
    } derive(Eq,
    Debug
    )

    CSS column-span property.
    impl Show for ColumnSpan

    Contain

    pub(all) struct Contain {
    size : Bool
    inline_size : Bool
    layout : Bool
    paint : Bool
    style : Bool
    } derive(Eq,
    Debug
    )

    CSS contain property - uses flags since multiple values can be combined e.g., "contain: layout paint" or "contain: strict"
    impl Show for Contain

    Contain::content

    fn Contain::content() -> Contain

    content = layout + paint + style (no size)

    Contain::has_containment

    fn Contain::has_containment(self : Contain) -> Bool

    Contain::none

    fn Contain::none() -> Contain

    Contain::strict

    fn Contain::strict() -> Contain

    strict = size + layout + paint + style

    Direction

    pub(all) enum Direction {
    Ltr
    Rtl
    } derive(Eq,
    Debug
    )

    CSS direction property (for inline text direction)
    impl Show for Direction

    Direction::is_rtl

    fn Direction::is_rtl(self : Direction) -> Bool

    Check if direction is right-to-left

    MarginTrim

    pub(all) enum MarginTrim {
    None
    BlockStart
    BlockEnd
    Block
    InlineStart
    InlineEnd
    Inline
    } derive(Eq,
    Debug
    )

    CSS margin-trim property
    impl Show for MarginTrim

    MarginTrim::trim_block_end

    fn MarginTrim::trim_block_end(self : MarginTrim) -> Bool

    MarginTrim::trim_block_start

    fn MarginTrim::trim_block_start(self : MarginTrim) -> Bool

    PointerEvents

    pub(all) enum PointerEvents {
    Auto
    None
    } derive(Eq,
    Debug
    )

    CSS pointer-events property (minimum subset for browser hit testing).

    ScrollSnapAlign

    pub(all) enum ScrollSnapAlign {
    None
    Start
    End
    Center
    } derive(Eq,
    Debug
    )

    CSS scroll-snap-align keywords

    ScrollSnapAxis

    pub(all) enum ScrollSnapAxis {
    None
    X
    Y
    Both
    } derive(Eq,
    Debug
    )

    CSS scroll-snap-type axis

    ScrollSnapStrictness

    pub(all) enum ScrollSnapStrictness {
    None
    Mandatory
    Proximity
    } derive(Eq,
    Debug
    )

    CSS scroll-snap-type strictness

    ScrollSnapType

    pub(all) struct ScrollSnapType {
    axis : ScrollSnapAxis
    strictness : ScrollSnapStrictness
    } derive(Eq,
    Debug
    )

    CSS scroll-snap-type value

    ScrollSnapType::is_mandatory

    fn ScrollSnapType::is_mandatory(self : ScrollSnapType) -> Bool

    ScrollSnapType::none

    ScrollSnapType::snaps_x

    fn ScrollSnapType::snaps_x(self : ScrollSnapType) -> Bool

    ScrollSnapType::snaps_y

    fn ScrollSnapType::snaps_y(self : ScrollSnapType) -> Bool

    Style

    pub(all) struct Style {
    display :
    Display

    position :
    Position

    float :
    CssFloat

    clear :
    Clear

    box_sizing :
    BoxSizing

    overflow_x :
    Overflow

    overflow_y :
    Overflow

    scroll_snap_type : ScrollSnapType
    scroll_snap_align_x : ScrollSnapAlign
    scroll_snap_align_y : ScrollSnapAlign
    width :
    Dimension

    height :
    Dimension

    min_width :
    Dimension

    min_height :
    Dimension

    max_width :
    Dimension

    max_height :
    Dimension

    margin :
    Rect
    [
    Dimension
    ]
    padding :
    Rect
    [
    Dimension
    ]
    border :
    Rect
    [
    Dimension
    ]
    border_style :
    Rect
    [BorderStyle]
    border_color :
    Rect
    [
    Color
    ]
    margin_trim : MarginTrim
    flex_direction :
    FlexDirection

    flex_wrap :
    FlexWrap

    justify_content :
    Alignment

    align_items :
    Alignment

    align_content :
    Alignment

    justify_content_unsafe : Bool
    align_content_unsafe : Bool
    align_self :
    AlignSelf

    flex_grow : Double
    flex_shrink : Double
    flex_basis :
    Dimension

    order : Int
    row_gap :
    Dimension

    column_gap :
    Dimension

    column_gap_is_normal : Bool
    column_count : Int?
    column_width :
    Dimension

    column_fill : ColumnFill
    aspect_ratio : Double?
    inset :
    Rect
    [
    Dimension
    ]
    grid_template_rows : Array[
    TrackSizingFunction
    ]
    grid_template_columns : Array[
    TrackSizingFunction
    ]
    grid_auto_rows : Array[
    TrackSizingFunction
    ]
    grid_auto_columns : Array[
    TrackSizingFunction
    ]
    grid_auto_flow :
    GridAutoFlow

    grid_template_column_line_names : Array[Array[String]]
    grid_template_row_line_names : Array[Array[String]]
    grid_template_columns_kind :
    GridTemplateKind

    grid_template_rows_kind :
    GridTemplateKind

    grid_template_areas : Array[String]
    grid_row :
    GridLine

    grid_column :
    GridLine

    grid_area : String?
    justify_items :
    Alignment

    justify_self :
    AlignSelf

    font_size : Double
    font_weight : Double
    font_family : String
    line_height : Double
    text_align : TextAlign
    white_space : WhiteSpace
    text_overflow : TextOverflow
    writing_mode : WritingMode
    direction : Direction
    vertical_align : VerticalAlign
    clip :
    ClipRect

    clip_path : ClipPath
    visibility : Visibility
    pointer_events : PointerEvents
    z_index : ZIndex
    opacity : Double
    color :
    Color

    background_color :
    Color

    background_image :
    BackgroundImage

    box_shadows : Array[BoxShadow]
    contain : Contain
    break_before : BreakBefore
    break_after : BreakBefore
    break_inside : BreakInside
    column_span : ColumnSpan
    contain_intrinsic_inline_size : Double?
    contain_intrinsic_block_size : Double?
    transform : Transform
    individual_transform : Transform
    animation_name : Array[String]
    animation_duration : Array[Double]
    animation_timing_function : Array[
    Easing
    ]
    animation_delay : Array[Double]
    animation_iteration_count : Array[
    AnimationIterationCount
    ]
    animation_direction : Array[
    AnimationDirection
    ]
    animation_fill_mode : Array[
    AnimationFillMode
    ]
    animation_play_state : Array[
    AnimationPlayState
    ]
    transition_property : Array[String]
    transition_duration : Array[Double]
    transition_timing_function : Array[
    Easing
    ]
    transition_delay : Array[Double]
    has_filter : Bool
    zoom : Double
    border_spacing : Double
    border_spacing_vertical : Double
    border_collapse : BorderCollapse
    table_layout : TableLayout
    caption_side : CaptionSide
    rowspan : Int
    colspan : Int
    border_top_left_radius : Double
    border_top_right_radius : Double
    border_bottom_right_radius : Double
    border_bottom_left_radius : Double
    text_decoration_underline : Bool
    text_decoration_line_through : Bool
    text_decoration_overline : Bool
    letter_spacing : Double
    word_spacing : Double
    } derive(Eq,
    Debug
    )

    CSS Style definition for layout computation All fields are mutable to support Yoga-like setter API

    Style::contained_intrinsic_height_fallback

    fn Style::contained_intrinsic_height_fallback(self : Style) -> Double

    Fallback intrinsic contribution on physical height from contain-intrinsic-size.

    Style::contained_intrinsic_width_fallback

    fn Style::contained_intrinsic_width_fallback(self : Style) -> Double

    Fallback intrinsic contribution on physical width from contain-intrinsic-size.

    Style::default

    fn Style::default() -> Style

    Style::has_multicol

    fn Style::has_multicol(self : Style) -> Bool

    Whether this style enables CSS multi-column layout.

    Style::layout_eq

    fn Style::layout_eq(self : Style, other : Style) -> Bool

    Compare only fields that can affect layout results.

    Paint-only fields such as colors, backgrounds, shadows, opacity, pointer-events, z-index, and clipping are intentionally ignored so callers can distinguish layout invalidation from repaint-only changes.

    Style::suppresses_intrinsic_height

    fn Style::suppresses_intrinsic_height(self : Style) -> Bool

    Whether containment suppresses intrinsic contribution on physical height.

    Style::suppresses_intrinsic_width

    fn Style::suppresses_intrinsic_width(self : Style) -> Bool

    Whether containment suppresses intrinsic contribution on physical width.

    TableLayout

    pub(all) enum TableLayout {
    Auto
    Fixed
    } derive(Eq,
    Debug
    )

    Table layout algorithm
    impl Show for TableLayout

    TextAlign

    pub(all) enum TextAlign {
    Start
    End
    Left
    Right
    Center
    Justify
    } derive(Eq,
    Debug
    )

    CSS text-align property
    impl Show for TextAlign

    TextOverflow

    pub(all) enum TextOverflow {
    Clip
    Ellipsis
    } derive(Eq,
    Debug
    )

    CSS text-overflow property.

    Transform

    pub(all) struct Transform {
    translate_x : TranslateValue
    translate_y : TranslateValue
    scale_x : Double
    scale_y : Double
    rotate_degrees : Double
    skew_x_degrees : Double
    skew_y_degrees : Double
    has_matrix : Bool
    matrix_a : Double
    matrix_b : Double
    matrix_c : Double
    matrix_d : Double
    matrix_e : Double
    matrix_f : Double
    matrix3d : Array[Double]
    } derive(Eq,
    Debug
    )

    CSS transform property - list of transform functions Supports a 2D subset for visual hit testing.
    impl Show for Transform

    Transform::compute_translate_x

    fn Transform::compute_translate_x(self : Transform, element_width : Double) -> Double

    Compute translate X offset given element width

    Transform::compute_translate_y

    fn Transform::compute_translate_y(self : Transform, element_height : Double) -> Double

    Compute translate Y offset given element height

    Transform::has_affine_matrix

    fn Transform::has_affine_matrix(self : Transform) -> Bool

    Check if transform has an explicit non-identity matrix applied

    Transform::has_matrix3d

    fn Transform::has_matrix3d(self : Transform) -> Bool

    Whether this transform carries an explicit matrix3d().

    Transform::has_scale

    fn Transform::has_scale(self : Transform) -> Bool

    Check if transform has scale applied

    Transform::has_skew

    fn Transform::has_skew(self : Transform) -> Bool

    Check if transform has skew applied

    Transform::is_none

    fn Transform::is_none(self : Transform) -> Bool

    Check if transform is identity (no visual change)

    Transform::none

    fn Transform::none() -> Transform

    Create a none/identity transform

    Transform::quarter_turns

    fn Transform::quarter_turns(self : Transform) -> Int

    Return a quarter-turn rotation count (0..3), or -1 for other angles.

    TranslateValue

    pub(all) enum TranslateValue {
    Length(Double)
    Percent(Double)
    } derive(Eq,
    Debug
    )

    CSS transform translate value (can be length or percent)

    VerticalAlign

    pub(all) enum VerticalAlign {
    Baseline
    Top
    Middle
    Bottom
    TextTop
    TextBottom
    Sub
    Super
    } derive(Eq,
    Debug
    )

    Vertical alignment for inline elements

    Visibility

    pub(all) enum Visibility {
    Visible
    Hidden
    Collapse
    } derive(Eq,
    Debug
    )

    CSS visibility property
    impl Show for Visibility

    WhiteSpace

    pub(all) enum WhiteSpace {
    Normal
    Nowrap
    Pre
    PreWrap
    PreLine
    } derive(Eq,
    Debug
    )

    CSS white-space property (for text wrapping)
    impl Show for WhiteSpace

    WritingMode

    pub(all) enum WritingMode {
    HorizontalTb
    VerticalRl
    VerticalLr
    } derive(Eq,
    Debug
    )

    CSS writing-mode property (for text direction and flow)
    impl Show for WritingMode

    WritingMode::is_block_rtl

    fn WritingMode::is_block_rtl(self : WritingMode) -> Bool

    Check if block direction is right-to-left (vertical-rl) In vertical-rl, blocks flow from right to left

    WritingMode::is_vertical

    fn WritingMode::is_vertical(self : WritingMode) -> Bool

    Check if writing mode is vertical

    ZIndex

    pub(all) enum ZIndex {
    Auto
    Value(Int)
    } derive(Eq,
    Debug
    )

    CSS z-index property
    impl Show for ZIndex

    Source Files