Skip to content

[css-overflow][css-text-decor] should text-decoration include ellipsis? #6531

@delan

Description

@delan

Given the following (demo), should the decorations extend to cover the “…” or “,,,”?

<style>
main {
    text-decoration: underline;
}
main > p {
    text-decoration: overline;
    overflow: hidden;
    white-space: nowrap;
    width: 3em;
}
</style>
<main>
    <p style='text-overflow: ellipsis;'>hello world</p>
    <p style='text-overflow: ",,,";'>hello world</p>
</main>

No known impl says yes, but I couldn’t find it specified anywhere in css-overflow or css-text-decor. @mrego thought it would be good to ask after seeing this code in Chromium:

  if (style.TextDecorationsInEffect() == TextDecoration::kNone ||
      // Ellipsis should not have text decorations. This is not defined, but
      // 4 impls do this.
      text_item.IsEllipsis()) {
    return absl::nullopt;
  }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions