applyAttributeStyle method

void applyAttributeStyle(
  1. CSSStyleDeclaration style
)

Implementation

void applyAttributeStyle(CSSStyleDeclaration style) {
  // Map the dir attribute to CSS direction so inline layout picks up RTL/LTR hints.
  final String? dirAttr = attributes['dir'];
  if (dirAttr != null) {
    final String normalized = dirAttr.trim().toLowerCase();
    final TextDirection? resolved = CSSTextMixin.resolveDirection(normalized);
    if (resolved != null) {
      style.setProperty(DIRECTION, normalized);
    }
  }
}