Skip to content

Add box-sizing CSS property support to Style #69

@kevin-sakemaer

Description

@kevin-sakemaer

Description

The box-sizing CSS property is currently not supported as a named parameter in Style or Style.typed. Users must use .add('box-sizing', ...) as a workaround.

Expected

Add a strongly-typed CssBoxSizing enum and include boxSizing as a named parameter in Style.typed.

Proposed Implementation

/// Supported values for `box-sizing`.
enum CssBoxSizing {
  contentBox,
  borderBox;

  @override
  String toString() => name.replaceAll('Box', '-box');
}

Usage

Style.typed({
  boxSizing: CssBoxSizing.borderBox,
})

MDN Reference

https://developer.mozilla.org/en-US/docs/Web/CSS/box-sizing

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions