StyleBuilder
Mutable builder for a Style block. Each property mirrors a CSS property of the same name; leaving one null omits it (the cascade/UA defaults apply). build assembles the Style.
Several lengths are constrained to Length.Unit.Px by Style's own validation.
Properties
CSS align-items.
CSS background-color.
CSS border-color.
CSS border-radius; set via the borderRadius helpers.
CSS border-style.
CSS border-width; px only.
CSS flex-basis; set via flexBasis/flexBasisAuto.
CSS flex-direction.
CSS flex-shrink.
CSS font-family.
CSS font-weight; set via the fontWeight helpers.
CSS justify-content.
CSS letter-spacing; px only.
CSS line-height as a unitless multiplier.
CSS object-position; set via the objectPosition helper.
CSS text-decoration.
CSS text-overflow.
CSS text-transform.
CSS white-space.
Functions
Sets borderRadius to a uniform all radius on every corner.
Sets borderRadius to per-corner radii; omitted corners stay null.
Sets flexBasis to auto (FlexBasis.Auto).
Sets fontWeight to a keyword (e.g. normal, bold) as FontWeight.Keyword.
Sets fontWeight to a numeric weight (e.g. 400, 700) as FontWeight.Numeric.
Sets margin from vertical (top/bottom) and horizontal (left/right) values.
Sets margin to distinct per-side values.
Sets objectPosition from its horizontal and vertical alignment components.
Sets padding from vertical (top/bottom) and horizontal (left/right) values.
Sets padding to distinct per-side values.