Skip to content

[css-overflow-4] Clarification of text-overflow: <string> value; Rendering pipeline #11683

Open
@d-desiatkin

Description

@d-desiatkin

I am working on implementation of text-overflow-4 for servo web engine.
Currently CSS specification is underspecified in rendering part of text-overlfow: <string>

  1. How UA should handle bizzare symbols in user provided ellipsis string that will overflow the current linebox in block direction? (https://unicode-explorer.com/list/large , https://kai9987kai.pw/BU/Biggest%20Unicode.html)
  2. Do specification really want to provide user an ability to execute animations on text ellipsis symbols? I can think of several bizzare text-ellipsis animations that will severely impact the performance of web page.

Illustrations for the first question.

Currently specification mentiones that clip should be applied: but I believe that this will happen only in inline direction.
Behaviour and interreaction in block direction must be additionaly specified.

Ideally we want clear definition on how such custom ellisis strings should be rendered (z-index of such elements, clip rectangles of such elements, e.t.c).

You can find the screenshot of current behaviour in mozilla.

https://www.w3.org/TR/css-overflow-4/#text-overflow

CSS

span {
border: dashed 1px;
}

.ellipsis {
border: solid 1px;
height: 100px;
width: 250px;
border: 1px solid black;
line-height: 1em;

white-space: nowrap;
overflow: auto;
text-overflow: "꧅ ꧅ ꧅𒐫 ";
}

HTML

<div class=ellipsis>
foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo <br>
foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo <br>
foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo <br>
foo foo foo foo
</div>

<div class=ellipsis><span style="position: relative; left: 20px;">
꧅ foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
</span><br><span style="position: relative; left: 20px;">
꧅ foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
</span><br><span style="position: relative; left: 20px;">
꧅ foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
</span><br><span style="position: relative; left: 20px;">
꧅ foo foo foo
</span>
</div>

Behaviour in Mozilla:

Image


Illustrations of the second question

CSS

/* The animation code */
@keyframes example {
0% {text-overflow: "\E850";}
10% {text-overflow: "\E851";}
20% {text-overflow: "\E852";}
30% {text-overflow: "\E853";}
40% {text-overflow: "\E854";}
50% {text-overflow: "\E855";}
60% {text-overflow: "\E856";}
70% {text-overflow: "\E857";}
80% {text-overflow: "\E858";}
90% {text-overflow: "\E859";}
100% {text-overflow: "\e83f";}
}

span {
border: dashed 1px;
}

.ellipsis {
animation-name: example;
animation-duration: 1s;
animation-iteration-count: infinite;
border: solid 1px;
height: 100px;
width: 250px;
border: 1px solid black;
line-height: 1em;

font-family: 'Segoe MDL2 Assets';
white-space: nowrap;
overflow: auto;
text-overflow: "꧅ ꧅ ꧅𒐫";
}

HTML is the same as in the first example.

Behaviour in Mozilla:

Animations_css_text_overflow.mp4

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