///|
/// CSS border-style values, ordered by conflict resolution priority (higher wins).
pub(all) enum BorderStyle {
  None // 0 - lowest priority
  Inset // 1
  Groove // 2
  Outset // 3
  Ridge // 4
  Dotted // 5
  Dashed // 6
  Solid // 7
  Double // 8
  Hidden // 9 - highest priority (suppresses border)
} derive(Debug, Eq)

///|
pub fn BorderStyle::priority(self : BorderStyle) -> Int {
  match self {
    None => 0
    Inset => 1
    Groove => 2
    Outset => 3
    Ridge => 4
    Dotted => 5
    Dashed => 6
    Solid => 7
    Double => 8
    Hidden => 9
  }
}

///|
/// CSS border-collapse property (for tables)
pub(all) enum BorderCollapse {
  Separate // Default - borders have spacing
  Collapse // Adjacent borders merge
} derive(Debug, Eq)

///|
/// Table layout algorithm
pub(all) enum TableLayout {
  Auto // Default - column widths based on content
  Fixed // Column widths based on first row only
} derive(Debug, Eq)

///|
/// CSS caption-side property (for table captions)
pub(all) enum CaptionSide {
  Top // Caption above the table (default)
  Bottom // Caption below the table
} derive(Debug, Eq)

///|
/// CSS white-space property (for text wrapping)
pub(all) enum WhiteSpace {
  Normal // Default - collapse whitespace, wrap text
  Nowrap // Collapse whitespace, no wrapping
  Pre // Preserve whitespace, only wrap at newlines
  PreWrap // Preserve whitespace, wrap when needed
  PreLine // Collapse whitespace, wrap at newlines
} derive(Debug, Eq)

///|
/// CSS text-overflow property.
pub(all) enum TextOverflow {
  Clip
  Ellipsis
} derive(Debug, Eq)

///|
/// CSS writing-mode property (for text direction and flow)
pub(all) enum WritingMode {
  HorizontalTb // Default - left-to-right, top-to-bottom
  VerticalRl // Top-to-bottom, right-to-left (e.g., traditional Japanese)
  VerticalLr // Top-to-bottom, left-to-right (e.g., Mongolian)
} derive(Debug, Eq)

///|
/// Check if writing mode is vertical
pub fn WritingMode::is_vertical(self : WritingMode) -> Bool {
  match self {
    HorizontalTb => false
    VerticalRl | VerticalLr => true
  }
}

///|
/// Check if block direction is right-to-left (vertical-rl)
/// In vertical-rl, blocks flow from right to left
pub fn WritingMode::is_block_rtl(self : WritingMode) -> Bool {
  match self {
    VerticalRl => true
    HorizontalTb | VerticalLr => false
  }
}

///|
/// CSS direction property (for inline text direction)
pub(all) enum Direction {
  Ltr // Left-to-right (default)
  Rtl // Right-to-left (e.g., Arabic, Hebrew)
} derive(Debug, Eq)

///|
/// Check if direction is right-to-left
pub fn Direction::is_rtl(self : Direction) -> Bool {
  match self {
    Rtl => true
    Ltr => false
  }
}

///|
/// CSS text-align property
pub(all) enum TextAlign {
  Start
  End
  Left
  Right
  Center
  Justify
} derive(Debug, Eq)

///|
/// CSS scroll-snap-type axis
pub(all) enum ScrollSnapAxis {
  None
  X
  Y
  Both
} derive(Debug, Eq)

///|
/// CSS scroll-snap-type strictness
pub(all) enum ScrollSnapStrictness {
  None
  Mandatory
  Proximity
} derive(Debug, Eq)

///|
/// CSS scroll-snap-type value
pub(all) struct ScrollSnapType {
  axis : ScrollSnapAxis
  strictness : ScrollSnapStrictness
} derive(Debug, Eq)

///|
pub fn ScrollSnapType::none() -> ScrollSnapType {
  { axis: ScrollSnapAxis::None, strictness: ScrollSnapStrictness::None }
}

///|
pub fn ScrollSnapType::is_mandatory(self : ScrollSnapType) -> Bool {
  self.strictness == ScrollSnapStrictness::Mandatory
}

///|
pub fn ScrollSnapType::snaps_x(self : ScrollSnapType) -> Bool {
  match self.axis {
    ScrollSnapAxis::X | ScrollSnapAxis::Both => true
    ScrollSnapAxis::None | ScrollSnapAxis::Y => false
  }
}

///|
pub fn ScrollSnapType::snaps_y(self : ScrollSnapType) -> Bool {
  match self.axis {
    ScrollSnapAxis::Y | ScrollSnapAxis::Both => true
    ScrollSnapAxis::None | ScrollSnapAxis::X => false
  }
}

///|
/// CSS scroll-snap-align keywords
pub(all) enum ScrollSnapAlign {
  None
  Start
  End
  Center
} derive(Debug, Eq)

///|
/// CSS visibility property
pub(all) enum Visibility {
  Visible // Element is visible (default)
  Hidden // Element is invisible but takes up space
  Collapse // Same as hidden for most elements
} derive(Debug, Eq)

///|
/// CSS pointer-events property (minimum subset for browser hit testing).
pub(all) enum PointerEvents {
  Auto
  None
} derive(Debug, Eq)

///|
/// CSS margin-trim property
pub(all) enum MarginTrim {
  None
  BlockStart
  BlockEnd
  Block
  InlineStart
  InlineEnd
  Inline
} derive(Debug, Eq)

///|
/// CSS multi-column column-fill property.
pub(all) enum ColumnFill {
  Balance
  Auto
} derive(Debug, Eq)

///|
/// CSS break-before property (minimum subset for multicol tests).
pub(all) enum BreakBefore {
  Auto
  Column
  Avoid
} derive(Debug, Eq)

///|
/// CSS break-inside property (minimum subset for multicol tests).
pub(all) enum BreakInside {
  Auto
  Avoid
} derive(Debug, Eq)

///|
/// CSS column-span property.
pub(all) enum ColumnSpan {
  None
  All
} derive(Debug, Eq)

///|
pub fn MarginTrim::trim_block_start(self : MarginTrim) -> Bool {
  match self {
    BlockStart | Block => true
    None | BlockEnd | InlineStart | InlineEnd | Inline => false
  }
}

///|
pub fn MarginTrim::trim_block_end(self : MarginTrim) -> Bool {
  match self {
    BlockEnd | Block => true
    None | BlockStart | InlineStart | InlineEnd | Inline => false
  }
}

///|
/// CSS z-index property
pub(all) enum ZIndex {
  Auto // Stacking order determined by DOM order
  Value(Int) // Explicit stacking level
} derive(Debug, Eq)

///|
/// CSS transform translate value (can be length or percent)
pub(all) enum TranslateValue {
  Length(Double) // Fixed length in pixels
  Percent(Double) // Percentage of element's own dimension (0.0 - 1.0)
} derive(Debug, Eq)

///|
/// CSS transform property - list of transform functions
/// Supports translate and scale for layout purposes
pub(all) struct Transform {
  translate_x : TranslateValue // translateX or first arg of translate()
  translate_y : TranslateValue // translateY or second arg of translate()
  scale_x : Double // scaleX or first arg of scale() (default 1.0)
  scale_y : Double // scaleY or second arg of scale() (default 1.0)
} derive(Debug, Eq)

///|
/// Create a none/identity transform
pub fn Transform::none() -> Transform {
  {
    translate_x: TranslateValue::Length(0.0),
    translate_y: TranslateValue::Length(0.0),
    scale_x: 1.0,
    scale_y: 1.0,
  }
}

///|
/// Check if transform is identity (no visual change)
pub fn Transform::is_none(self : Transform) -> Bool {
  let translate_none = match (self.translate_x, self.translate_y) {
    (TranslateValue::Length(0.0), TranslateValue::Length(0.0)) => true
    (TranslateValue::Percent(0.0), TranslateValue::Percent(0.0)) => true
    _ => false
  }
  let scale_none = self.scale_x == 1.0 && self.scale_y == 1.0
  translate_none && scale_none
}

///|
/// Check if transform has scale applied
pub fn Transform::has_scale(self : Transform) -> Bool {
  self.scale_x != 1.0 || self.scale_y != 1.0
}

///|
/// Compute translate X offset given element width
pub fn Transform::compute_translate_x(
  self : Transform,
  element_width : Double,
) -> Double {
  match self.translate_x {
    TranslateValue::Length(v) => v
    TranslateValue::Percent(p) => element_width * p
  }
}

///|
/// Compute translate Y offset given element height
pub fn Transform::compute_translate_y(
  self : Transform,
  element_height : Double,
) -> Double {
  match self.translate_y {
    TranslateValue::Length(v) => v
    TranslateValue::Percent(p) => element_height * p
  }
}

///|
/// CSS contain property - uses flags since multiple values can be combined
/// e.g., "contain: layout paint" or "contain: strict"
pub(all) struct Contain {
  size : Bool // Size containment - element size computed independently
  inline_size : Bool // Inline-size containment only (mutually exclusive with size)
  layout : Bool // Layout containment - isolates internal layout
  paint : Bool // Paint containment - clips overflow, creates stacking context
  style : Bool // Style containment - scopes counters/quotes
} derive(Debug, Eq)

///|
pub fn Contain::none() -> Contain {
  { size: false, inline_size: false, layout: false, paint: false, style: false }
}

///|
/// strict = size + layout + paint + style
pub fn Contain::strict() -> Contain {
  { size: true, inline_size: false, layout: true, paint: true, style: true }
}

///|
/// content = layout + paint + style (no size)
pub fn Contain::content() -> Contain {
  { size: false, inline_size: false, layout: true, paint: true, style: true }
}

///|
pub fn Contain::has_containment(self : Contain) -> Bool {
  self.size || self.inline_size || self.layout || self.paint || self.style
}

///|
/// Whether containment suppresses intrinsic contribution on physical width.
pub fn Style::suppresses_intrinsic_width(self : Style) -> Bool {
  self.contain.size ||
  (self.contain.inline_size && !self.writing_mode.is_vertical())
}

///|
/// Whether containment suppresses intrinsic contribution on physical height.
pub fn Style::suppresses_intrinsic_height(self : Style) -> Bool {
  self.contain.size ||
  (self.contain.inline_size && self.writing_mode.is_vertical())
}

///|
/// Fallback intrinsic contribution on physical width from contain-intrinsic-size.
pub fn Style::contained_intrinsic_width_fallback(self : Style) -> Double {
  if self.writing_mode.is_vertical() {
    match self.contain_intrinsic_block_size {
      Some(v) => if v > 0.0 { v } else { 0.0 }
      None => 0.0
    }
  } else {
    match self.contain_intrinsic_inline_size {
      Some(v) => if v > 0.0 { v } else { 0.0 }
      None => 0.0
    }
  }
}

///|
/// Fallback intrinsic contribution on physical height from contain-intrinsic-size.
pub fn Style::contained_intrinsic_height_fallback(self : Style) -> Double {
  if self.writing_mode.is_vertical() {
    match self.contain_intrinsic_inline_size {
      Some(v) => if v > 0.0 { v } else { 0.0 }
      None => 0.0
    }
  } else {
    match self.contain_intrinsic_block_size {
      Some(v) => if v > 0.0 { v } else { 0.0 }
      None => 0.0
    }
  }
}

///|
/// Whether this style enables CSS multi-column layout.
pub fn Style::has_multicol(self : Style) -> Bool {
  match self.column_count {
    // `column-count: 1` still establishes a multicol container; overflowing
    // content may fragment into additional columns.
    Some(v) => v > 0
    None =>
      match self.column_width {
        @types.Length(v) => v > 0.0
        @types.Percent(v) => v > 0.0
        @types.Auto
        | @types.MinContent
        | @types.MaxContent
        | @types.FitContent(_) => false
      }
  }
}

///|
/// Vertical alignment for inline elements
pub(all) enum VerticalAlign {
  Baseline // Align baseline (default, simplified to bottom for now)
  Top // Align to top of line box
  Middle // Align middle
  Bottom // Align to bottom of line box
  TextTop // Align to top of parent's font (simplified to Top)
  TextBottom // Align to bottom of parent's font (simplified to Bottom)
  Sub // Subscript position
  Super // Superscript position
} derive(Debug, Eq)

///|
pub impl Show for BorderStyle with output(self, logger) {
  let name = match self {
    None => "None"
    Inset => "Inset"
    Groove => "Groove"
    Outset => "Outset"
    Ridge => "Ridge"
    Dotted => "Dotted"
    Dashed => "Dashed"
    Solid => "Solid"
    Double => "Double"
    Hidden => "Hidden"
  }
  logger.write_string(name)
}

///|
pub impl Show for BorderCollapse with output(self, logger) {
  let name = match self {
    Separate => "Separate"
    Collapse => "Collapse"
  }
  logger.write_string(name)
}

///|
pub impl Show for TableLayout with output(self, logger) {
  let name = match self {
    Auto => "Auto"
    Fixed => "Fixed"
  }
  logger.write_string(name)
}

///|
pub impl Show for CaptionSide with output(self, logger) {
  let name = match self {
    Top => "Top"
    Bottom => "Bottom"
  }
  logger.write_string(name)
}

///|
pub impl Show for WhiteSpace with output(self, logger) {
  let name = match self {
    Normal => "Normal"
    Nowrap => "Nowrap"
    Pre => "Pre"
    PreWrap => "PreWrap"
    PreLine => "PreLine"
  }
  logger.write_string(name)
}

///|
pub impl Show for TextOverflow with output(self, logger) {
  let name = match self {
    Clip => "Clip"
    Ellipsis => "Ellipsis"
  }
  logger.write_string(name)
}

///|
pub impl Show for WritingMode with output(self, logger) {
  let name = match self {
    HorizontalTb => "HorizontalTb"
    VerticalRl => "VerticalRl"
    VerticalLr => "VerticalLr"
  }
  logger.write_string(name)
}

///|
pub impl Show for Direction with output(self, logger) {
  let name = match self {
    Ltr => "Ltr"
    Rtl => "Rtl"
  }
  logger.write_string(name)
}

///|
pub impl Show for TextAlign with output(self, logger) {
  let name = match self {
    Start => "Start"
    End => "End"
    Left => "Left"
    Right => "Right"
    Center => "Center"
    Justify => "Justify"
  }
  logger.write_string(name)
}

///|
pub impl Show for ScrollSnapAxis with output(self, logger) {
  let name = match self {
    None => "None"
    X => "X"
    Y => "Y"
    Both => "Both"
  }
  logger.write_string(name)
}

///|
pub impl Show for ScrollSnapStrictness with output(self, logger) {
  let name = match self {
    None => "None"
    Mandatory => "Mandatory"
    Proximity => "Proximity"
  }
  logger.write_string(name)
}

///|
pub impl Show for ScrollSnapType with output(self, logger) {
  logger.write_string("{axis: ")
  logger.write_string(self.axis.to_string())
  logger.write_string(", strictness: ")
  logger.write_string(self.strictness.to_string())
  logger.write_string("}")
}

///|
pub impl Show for ScrollSnapAlign with output(self, logger) {
  let name = match self {
    None => "None"
    Start => "Start"
    End => "End"
    Center => "Center"
  }
  logger.write_string(name)
}

///|
pub impl Show for Visibility with output(self, logger) {
  let name = match self {
    Visible => "Visible"
    Hidden => "Hidden"
    Collapse => "Collapse"
  }
  logger.write_string(name)
}

///|
pub impl Show for PointerEvents with output(self, logger) {
  let name = match self {
    Auto => "Auto"
    None => "None"
  }
  logger.write_string(name)
}

///|
pub impl Show for MarginTrim with output(self, logger) {
  let name = match self {
    None => "None"
    BlockStart => "BlockStart"
    BlockEnd => "BlockEnd"
    Block => "Block"
    InlineStart => "InlineStart"
    InlineEnd => "InlineEnd"
    Inline => "Inline"
  }
  logger.write_string(name)
}

///|
pub impl Show for ColumnFill with output(self, logger) {
  let name = match self {
    Balance => "Balance"
    Auto => "Auto"
  }
  logger.write_string(name)
}

///|
pub impl Show for BreakBefore with output(self, logger) {
  let name = match self {
    Auto => "Auto"
    Column => "Column"
    Avoid => "Avoid"
  }
  logger.write_string(name)
}

///|
pub impl Show for BreakInside with output(self, logger) {
  let name = match self {
    Auto => "Auto"
    Avoid => "Avoid"
  }
  logger.write_string(name)
}

///|
pub impl Show for ColumnSpan with output(self, logger) {
  let name = match self {
    None => "None"
    All => "All"
  }
  logger.write_string(name)
}

///|
pub impl Show for ZIndex with output(self, logger) {
  let text = match self {
    Auto => "Auto"
    Value(v) => "Value(\{v})"
  }
  logger.write_string(text)
}

///|
pub impl Show for TranslateValue with output(self, logger) {
  let text = match self {
    Length(v) => "Length(\{v})"
    Percent(v) => "Percent(\{v})"
  }
  logger.write_string(text)
}

///|
pub impl Show for Transform with output(self, logger) {
  logger.write_string("{translate_x: ")
  logger.write_string(self.translate_x.to_string())
  logger.write_string(", translate_y: ")
  logger.write_string(self.translate_y.to_string())
  logger.write_string(", scale_x: ")
  logger.write_string(self.scale_x.to_string())
  logger.write_string(", scale_y: ")
  logger.write_string(self.scale_y.to_string())
  logger.write_string("}")
}

///|
pub impl Show for Contain with output(self, logger) {
  logger.write_string("{size: ")
  logger.write_string(self.size.to_string())
  logger.write_string(", inline_size: ")
  logger.write_string(self.inline_size.to_string())
  logger.write_string(", layout: ")
  logger.write_string(self.layout.to_string())
  logger.write_string(", paint: ")
  logger.write_string(self.paint.to_string())
  logger.write_string(", style: ")
  logger.write_string(self.style.to_string())
  logger.write_string("}")
}

///|
pub impl Show for VerticalAlign with output(self, logger) {
  let name = match self {
    Baseline => "Baseline"
    Top => "Top"
    Middle => "Middle"
    Bottom => "Bottom"
    TextTop => "TextTop"
    TextBottom => "TextBottom"
    Sub => "Sub"
    Super => "Super"
  }
  logger.write_string(name)
}

///|
pub struct BoxShadow {
  inset : Bool
  offset_x : Double
  offset_y : Double
  blur_radius : Double
  spread_radius : Double
  color : @types.Color
}

///|
pub fn BoxShadow::new(
  inset : Bool,
  offset_x : Double,
  offset_y : Double,
  blur_radius : Double,
  spread_radius : Double,
  color : @types.Color,
) -> BoxShadow {
  { inset, offset_x, offset_y, blur_radius, spread_radius, color }
}

///|
/// CSS Style definition for layout computation
/// All fields are mutable to support Yoga-like setter API
pub(all) struct Style {
  mut display : @types.Display
  mut position : @types.Position
  mut float : @types.Float
  mut clear : @types.Clear
  // Box sizing
  mut box_sizing : @types.BoxSizing
  // Overflow
  mut overflow_x : @types.Overflow
  mut overflow_y : @types.Overflow
  // Scroll snap
  mut scroll_snap_type : ScrollSnapType
  mut scroll_snap_align_x : ScrollSnapAlign
  mut scroll_snap_align_y : ScrollSnapAlign
  // Sizing
  mut width : @types.Dimension
  mut height : @types.Dimension
  mut min_width : @types.Dimension
  mut min_height : @types.Dimension
  mut max_width : @types.Dimension
  mut max_height : @types.Dimension
  // Box model
  mut margin : @types.Rect[@types.Dimension]
  mut padding : @types.Rect[@types.Dimension]
  mut border : @types.Rect[@types.Dimension]
  mut border_style : @types.Rect[BorderStyle]
  mut border_color : @types.Rect[@types.Color]
  mut margin_trim : MarginTrim
  // Flexbox
  mut flex_direction : @types.FlexDirection
  mut flex_wrap : @types.FlexWrap
  mut justify_content : @types.Alignment
  mut align_items : @types.Alignment
  mut align_content : @types.Alignment
  // Whether overflow alignment requested `unsafe` position.
  // Unqualified values default to safe behavior for initial scroll positioning.
  mut justify_content_unsafe : Bool
  mut align_content_unsafe : Bool
  mut align_self : @types.AlignSelf
  mut flex_grow : Double
  mut flex_shrink : Double
  mut flex_basis : @types.Dimension
  mut order : Int // Flex item order (default 0)
  // Gap
  mut row_gap : @types.Dimension
  mut column_gap : @types.Dimension
  mut column_gap_is_normal : Bool
  // Multi-column layout
  mut column_count : Int? // None = auto
  mut column_width : @types.Dimension // auto or fixed width
  mut column_fill : ColumnFill
  // Aspect ratio (width / height)
  mut aspect_ratio : Double?
  // Inset for position: absolute (left, right, top, bottom)
  mut inset : @types.Rect[@types.Dimension]
  // Grid container properties
  mut grid_template_rows : Array[@types.TrackSizingFunction]
  mut grid_template_columns : Array[@types.TrackSizingFunction]
  mut grid_auto_rows : Array[@types.TrackSizingFunction]
  mut grid_auto_columns : Array[@types.TrackSizingFunction]
  mut grid_auto_flow : @types.GridAutoFlow
  // Grid template areas (each string is a row, e.g. ["header header", "sidebar main"])
  mut grid_template_areas : Array[String]
  // Grid item properties
  mut grid_row : @types.GridLine
  mut grid_column : @types.GridLine
  mut grid_area : String? // Named area for item placement
  // justify-items for grid (different from justify-content)
  mut justify_items : @types.Alignment
  // justify-self for grid items (horizontal self-alignment)
  mut justify_self : @types.AlignSelf
  // Font properties (for baseline calculation)
  mut font_size : Double // Computed font size in pixels (default 16.0)
  mut font_weight : Double // Computed font weight (100-900, default 400)
  mut font_family : String // Computed font family (default "")
  mut line_height : Double // Computed line height in pixels (default = font_size)
  // Text wrapping and direction
  mut text_align : TextAlign
  mut white_space : WhiteSpace // white-space: normal | nowrap | pre | pre-wrap | pre-line
  mut text_overflow : TextOverflow // text-overflow: clip | ellipsis
  mut writing_mode : WritingMode // writing-mode: horizontal-tb | vertical-rl | vertical-lr
  mut direction : Direction // direction: ltr | rtl (inline text direction)
  // Vertical alignment for inline elements
  mut vertical_align : VerticalAlign
  // Clip (legacy, deprecated but widely used for a11y)
  mut clip : @types.ClipRect
  // Paint properties (visual, not layout)
  mut visibility : Visibility
  mut pointer_events : PointerEvents
  mut z_index : ZIndex
  mut opacity : Double // 0.0 = transparent, 1.0 = opaque
  // Color properties (resolved RGBA values)
  mut color : @types.Color // Text color (inherited)
  mut background_color : @types.Color // Background color (not inherited)
  mut background_image : @types.BackgroundImage // Background image (gradient etc.)
  mut box_shadows : Array[BoxShadow]
  // Containment (for layout optimization)
  mut contain : Contain
  // Fragmentation
  mut break_before : BreakBefore
  mut break_after : BreakBefore
  mut break_inside : BreakInside
  mut column_span : ColumnSpan
  // contain-intrinsic-* fallback sizes (content-box lengths in px)
  mut contain_intrinsic_inline_size : Double?
  mut contain_intrinsic_block_size : Double?
  // CSS transform (visual offset, applied in paint phase)
  mut transform : Transform
  // CSS zoom (affects layout scaling, inherited)
  mut zoom : Double // zoom factor (1.0 = 100%, 2.0 = 200%)
  // Table properties
  mut border_spacing : Double // border-spacing horizontal in pixels
  mut border_spacing_vertical : Double // border-spacing vertical in pixels
  mut border_collapse : BorderCollapse // border-collapse: separate | collapse
  mut table_layout : TableLayout // table-layout: auto | fixed
  mut caption_side : CaptionSide // caption-side: top | bottom
  // Table cell properties (from HTML attributes)
  mut rowspan : Int // rowspan attribute (default 1)
  mut colspan : Int // colspan attribute (default 1)
  // Border radius (computed px values for rounded corners)
  mut border_top_left_radius : Double
  mut border_top_right_radius : Double
  mut border_bottom_right_radius : Double
  mut border_bottom_left_radius : Double
  // Text decoration
  mut text_decoration_underline : Bool
  mut text_decoration_line_through : Bool
  mut text_decoration_overline : Bool
  // Letter/word spacing
  mut letter_spacing : Double // in pixels, 0 = normal
  mut word_spacing : Double // in pixels, 0 = normal
}

///|
pub fn Style::default() -> Style {
  {
    display: @types.Block,
    position: @types.Static,
    float: @types.Float::None,
    clear: @types.Clear::None,
    box_sizing: @types.ContentBox,
    overflow_x: @types.Visible,
    overflow_y: @types.Visible,
    scroll_snap_type: ScrollSnapType::none(),
    scroll_snap_align_x: ScrollSnapAlign::None,
    scroll_snap_align_y: ScrollSnapAlign::None,
    width: @types.Auto,
    height: @types.Auto,
    min_width: @types.Auto,
    min_height: @types.Auto,
    max_width: @types.Auto,
    max_height: @types.Auto,
    margin: {
      left: @types.Length(0.0),
      right: @types.Length(0.0),
      top: @types.Length(0.0),
      bottom: @types.Length(0.0),
    },
    border_style: { left: None, right: None, top: None, bottom: None },
    border_color: {
      left: @types.Color::transparent(),
      right: @types.Color::transparent(),
      top: @types.Color::transparent(),
      bottom: @types.Color::transparent(),
    },
    padding: {
      left: @types.Length(0.0),
      right: @types.Length(0.0),
      top: @types.Length(0.0),
      bottom: @types.Length(0.0),
    },
    border: {
      left: @types.Length(0.0),
      right: @types.Length(0.0),
      top: @types.Length(0.0),
      bottom: @types.Length(0.0),
    },
    margin_trim: MarginTrim::None,
    flex_direction: @types.Row,
    flex_wrap: @types.NoWrap,
    justify_content: @types.Start,
    align_items: @types.Stretch,
    align_content: @types.Stretch,
    justify_content_unsafe: false,
    align_content_unsafe: false,
    align_self: @types.AlignSelf::Auto,
    flex_grow: 0.0,
    flex_shrink: 1.0,
    flex_basis: @types.Auto,
    order: 0,
    row_gap: @types.Length(0.0),
    column_gap: @types.Length(0.0),
    column_gap_is_normal: true,
    column_count: None,
    column_width: @types.Auto,
    column_fill: Balance,
    aspect_ratio: None,
    inset: {
      left: @types.Auto,
      right: @types.Auto,
      top: @types.Auto,
      bottom: @types.Auto,
    },
    grid_template_rows: [],
    grid_template_columns: [],
    grid_auto_rows: [],
    grid_auto_columns: [],
    grid_auto_flow: @types.Row,
    grid_template_areas: [],
    grid_row: @types.GridLine::auto(),
    grid_column: @types.GridLine::auto(),
    grid_area: None,
    justify_items: @types.Stretch,
    justify_self: @types.AlignSelf::Auto,
    font_size: 16.0,
    font_weight: 400.0,
    font_family: "",
    line_height: 19.2, // 16.0 * 1.2 (CSS initial: normal)
    text_align: Start,
    white_space: Normal,
    text_overflow: Clip,
    writing_mode: HorizontalTb,
    direction: Ltr,
    vertical_align: Baseline,
    clip: @types.ClipRect::Auto,
    visibility: Visible,
    pointer_events: PointerEvents::Auto,
    z_index: Auto,
    opacity: 1.0,
    color: @types.Color::black(),
    background_color: @types.Color::transparent(),
    background_image: @types.None,
    box_shadows: [],
    contain: Contain::none(),
    break_before: BreakBefore::Auto,
    break_after: BreakBefore::Auto,
    break_inside: BreakInside::Auto,
    column_span: ColumnSpan::None,
    contain_intrinsic_inline_size: None,
    contain_intrinsic_block_size: None,
    transform: Transform::none(),
    zoom: 1.0,
    border_spacing: 0.0,
    border_spacing_vertical: 0.0,
    border_collapse: Separate,
    table_layout: Auto,
    caption_side: Top,
    rowspan: 1,
    colspan: 1,
    border_top_left_radius: 0.0,
    border_top_right_radius: 0.0,
    border_bottom_right_radius: 0.0,
    border_bottom_left_radius: 0.0,
    text_decoration_underline: false,
    text_decoration_line_through: false,
    text_decoration_overline: false,
    letter_spacing: 0.0,
    word_spacing: 0.0,
  }
}