Skip to content

[css-overflow-4] Clarify mandatory behavior for text-overflow with scrolling #11291

Open
@gitspeaks

Description

@gitspeaks

The CSS Overflow 4 spec, Section 4.1 states:

When an element is scrolled (e.g. by the user, DOM manipulation), more of the element’s content is shown. The value of text-overflow should not affect whether more of the element’s content is shown or not. If a non-clip text-overflow is set, then as more content is scrolled into view, implementations should show whatever additional content fits, only truncating content which would otherwise be clipped (or is necessary to make room for the ellipsis/string), until the element is scrolled far enough to display the edge of the content at which point that content should be displayed rather than an ellipsis/string.

Firefox complies with this specification. Chrome does not follow this behavior. There is an open bug for this issue.

The reasoning provided is that the specification uses the term should, which is interpreted as suggestive rather than mandatory. Specifically:

(1) "The value of text-overflow should not affect whether more of the element’s content is shown or not."

(2) "If a non-clip text-overflow is set, then as more content is scrolled into view, implementations should show whatever additional content fits..."

Admittedly, statement 1 initially confused me, but I interpret it to mean that text-overflow neither activates nor prevents scrolling. Statement 2, however, reads as "strongly encouraged."

In my opinion, the spec should be revised to explicitly make this behavior mandatory.

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