Skip to content

[css-display-3] Clarify the term "contiguous sequence of sibling text nodes" #4860

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
SelenIT opened this issue Mar 11, 2020 · 3 comments
Closed
Labels
css-display-3 Current Work

Comments

@SelenIT
Copy link
Collaborator

SelenIT commented Mar 11, 2020

In the introduction section of [css-display-3], the "text run" concept is introduced in the following paragraph:

...each contiguous sequence of sibling text nodes generates a text run containing their text contents, which is assigned the same styles as the generating text nodes.

As far as I understand, several contiguous sibling text nodes in the same element can occur only as a result of DOM operations like appendChild(). But what about sibling text nodes separated only by the HTML comment node? Technically, they hardly can be called "a contiguous sequence", but the intent of the "text run" concept seems to suggest that they should form a single text run rather than two separate ones. Doesn't this need clarifying?

@Loirooriol
Copy link
Contributor

My understanding is that comment nodes exist in the DOM tree but not in the element tree.
The element tree only contains text nodes and elements (including pseudo-elements).
So in your example, the text nodes are actually contiguous.
But of course this needs to be properly defined, see #1810

@SelenIT
Copy link
Collaborator Author

SelenIT commented Mar 11, 2020

My understanding was that the element tree is an abstraction and DOM is one its possible implementation (not the only, but the most practically common), so I didn't think of it as of some intermediate structure. This comment from @fantasai seems to support this understanding. So making this definition unambiguous would be really appreciated!

@tabatkins
Copy link
Member

I think it's reasonable to clarify that nodes other than element or text are ignored for the purpose of this definition, yeah.

@tabatkins tabatkins added the css-display-3 Current Work label Mar 11, 2020
JTensai pushed a commit to JTensai/csswg-drafts that referenced this issue May 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-display-3 Current Work
Projects
None yet
Development

No branches or pull requests

3 participants