anywhere property

bool get anywhere

A LINE THAT MAY BREAK A WORD ANYWHERE IS AS NARROW AS ITS WIDEST GRAPHEME. overflow-wrap: anywhere breaks a word too long for its line between any two of its grapheme clusters, and -- unlike break-word -- the soft wrap opportunities it brings are considered in the min-content size (css-text-3 5.5; the legacy word-break: break-word is anywhere with word-break: normal, 5.2). Blink measures min-content by breaking at every one of them, each piece as the run shaped it (NGLineBreaker, kMinContent). A paragraph's own least is its widest WORD (Skia's minIntrinsicWidth), so a fit-content box round Cookie Preferences in a 60px column stood at Preferences, 91.5 wide and two lines, where Chrome makes it 60 and breaks the word into three (fixtures/shrink-line-text n2: a product site's footer links). Laid out at no width at all, Skia puts one cluster on each line, measured where the run shaped it (_anywhereFloor); a widget on the line at its own least, as the paragraph asks it (RenderParagraph.computeMinIntrinsicWidth). A line laid out in a room breaks its words where it runs out of room either way, as Skia does: only the least width moves. NEGATIVE: break-word (the paragraph's own least), a text that never wraps (its line).

Implementation

bool get anywhere => _anywhere;
set anywhere (bool v)

Implementation

set anywhere(bool v) {
  if (v == _anywhere) return;
  _anywhere = v;
  markNeedsLayout();
}