• Hans Muller's avatar
    StyledText is just a convenient way to specify a · 59c4078a
    Hans Muller authored
    tree of InlineStyle and InlineText elements.
    StyledText builds an Inline that renders the tree.
    
    For example this StyledText object:
    
      new StyledText(["FOO", [boldLargerStyle, [greenStyle "BAR"], "BAZ"] BORF]);
    
    Renders the same way the following HTML would,
    assuming that TextStyles boldLargerStyle and
    greenStyle were defined.
    
    <style>
    div {
      display: inline;
    }
    </style>
    <p>
      <div>
        FOO
        <div style="font-weight:bold; font-size:larger">
          <div style="color:green">
            BAR
          </div>
          BAZ
        </div>
        BORF
      </div>
    </p>
    
    R=abarth@chromium.org
    
    Review URL: https://codereview.chromium.org/1194693002.
    59c4078a
Name
Last commit
Last update
examples Loading commit data...