该页面暂无翻译,已显示英文版本。

TextAlign

Text alignment enumeration (for block layout)

Used by block layout to implement the legacy behaviour of <center> and <div align="left | right | center">.

Example

import { Style, TextAlign } from "taffy-layout"; const style = new Style(); style.textAlign = TextAlign.LegacyCenter; // Center block children

Enumeration Members

Enumeration MemberValueDescription
Auto0No special legacy text align behaviour
LegacyCenter3Corresponds to -webkit-center or -moz-center in browsers
LegacyLeft1Corresponds to -webkit-left or -moz-left in browsers
LegacyRight2Corresponds to -webkit-right or -moz-right in browsers

© 2026 ByteLand Technology Limited