You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Each box in the box tree represents its corresponding element (or pseudo-element)
in space and/or time on the canvas, while each TEXT RUN in the box tree likewise represents
the contents of its corresponding text nodes.
after a lot of time trying to translate this term into my language, I think it may be a mistake and that this word "run" was added by mistake.
I don't think that's added by mistake. While it's a different spec, HTML also uses "run" as a noun meaning like a sequence.
(And that confuses people, too. whatwg/html#6782)
@dbaron They're similar but not quite the same. IIRC text runs in Gecko can cross element boundaries, as long as there's no styling change that would create an interruption. Either way, though, I think it's worth using terminology that's less likely to confuse people.
I think “text run” is a term of art that does not quite match what is being described in the spec, and I don’t see a benefit in using that term that offsets the confusion being generated. So I support changing to “text sequence.”
Since this change is fairly low-impact we likely do not need to spend meeting time on it.
The CSSWG will automatically accept this resolution one week from now if no objections are raised here. Anyone can add an emoji to this comment to express support. If you do not support this resolution, please add a new comment.
Proposed Resolution: Change the term “text run” to “text sequence” in css-display-3
Reacted by Ilya Streltsyn, thecalamiity, fantasai and Philippe Letocha Torgue
I think the latter is better, "sequence of sequences" seems unnecessarily verbose.
But doesn't it affect the meaning? Will "each child text sequence" not imply that each text sequence created by a display:contents child becomes a separate flex/grid item? I believe that "sequence of sequences" wording was specifically introduced to clarify that they will become a single flex/grid item (possibly with differently styled parts of text), though I agree that there should be better wording to express this intent.
Returning to the topic, I'd like to clarify the following piece of the current definition:
Similarly, each contiguous sequence of sibling text nodes generates a text sequence containing their text contents, which is assigned the same styles as the generating text nodes.
The part I emphasized seems a bit ambiguous to me: does it already imply that a single text sequence can contain parts of text with multiple different stylings (e.g. in case of display:contents) or not? If yes, the change above appears correct, but a separate term for each same-style sub-sequence would probably be needed. IIRC, the original "text run" term referred to the same-style sequences, and the "sequence of sequences" wording intended to highlight it.
Activity
myakura commentedon Sep 20, 2022
I don't think that's added by mistake. While it's a different spec, HTML also uses "run" as a noun meaning like a sequence.
(And that confuses people, too. whatwg/html#6782)
Loirooriol commentedon Sep 20, 2022
Yeah, a text run is the thing in the box tree that represents a sequence of adjacent DOM text nodes in the element tree. Basically:
fantasai commentedon Dec 7, 2022
Re-opening in response to @myakura's comment, because maybe we should rename “text run” to “text sequence”!
dbaron commentedon Dec 7, 2022
"text run" is a term used elsewhere for similar purposes, e.g. https://learn.microsoft.com/en-us/dotnet/api/system.windows.media.textformatting.textrun?view=windowsdesktop-7.0 That said, I'm not sure if the use in the display spec matches the meaning in Gecko (where it has been used for a long time).
fantasai commentedon Dec 7, 2022
@dbaron They're similar but not quite the same. IIRC text runs in Gecko can cross element boundaries, as long as there's no styling change that would create an interruption. Either way, though, I think it's worth using terminology that's less likely to confuse people.
astearns commentedon Dec 13, 2022
I think “text run” is a term of art that does not quite match what is being described in the spec, and I don’t see a benefit in using that term that offsets the confusion being generated. So I support changing to “text sequence.”
astearns commentedon Dec 13, 2022
Since this change is fairly low-impact we likely do not need to spend meeting time on it.
The CSSWG will automatically accept this resolution one week from now if no objections are raised here. Anyone can add an emoji to this comment to express support. If you do not support this resolution, please add a new comment.
Proposed Resolution: Change the term “text run” to “text sequence” in css-display-3
11 remaining items
Loirooriol commentedon Mar 14, 2023
@fantasai Why do flex and grid use different wordings now?
I think the latter is better, "sequence of sequences" seems unnecessarily verbose.
[css-flexbox-1] align wording
fantasai commentedon Mar 17, 2023
@Loirooriol Fixed, thanks.
SelenIT commentedon Mar 18, 2023
But doesn't it affect the meaning? Will "each child text sequence" not imply that each text sequence created by a
display:contentschild becomes a separate flex/grid item? I believe that "sequence of sequences" wording was specifically introduced to clarify that they will become a single flex/grid item (possibly with differently styled parts of text), though I agree that there should be better wording to express this intent.Loirooriol commentedon Mar 19, 2023
Good point, I didn't consider
display: contents.letochagone commentedon Mar 12, 2026
@fantasai Perfect! It's much clearer now. Thank you!
Loirooriol commentedon Mar 24, 2026
Not perfect, it's wrong, see above
ByteEater-pl commentedon Apr 2, 2026
The term text run is also used in SVG.
letochagone commentedon May 10, 2026
I found another text where this "untranslatable" word is used:
https://html.spec.whatwg.org/multipage/dom.html#phrasing-content
SelenIT commentedon May 13, 2026
Returning to the topic, I'd like to clarify the following piece of the current definition:
The part I emphasized seems a bit ambiguous to me: does it already imply that a single text sequence can contain parts of text with multiple different stylings (e.g. in case of
display:contents) or not? If yes, the change above appears correct, but a separate term for each same-style sub-sequence would probably be needed. IIRC, the original "text run" term referred to the same-style sequences, and the "sequence of sequences" wording intended to highlight it.