applyAttributeStyle method

void applyAttributeStyle(
  1. ElementCSSStyleDeclaration style
)

Implementation

void applyAttributeStyle(ElementCSSStyleDeclaration 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.enqueueSheetProperty(DIRECTION, normalized);
    }
  }
}