Skip to content
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

Text nodes do not have a "border box" #33

Open
bzbarsky opened this issue Aug 14, 2019 · 3 comments
Open

Text nodes do not have a "border box" #33

bzbarsky opened this issue Aug 14, 2019 · 3 comments

Comments

@bzbarsky
Copy link

https://wicg.github.io/element-timing/#sec-report-text step 2.1 says:

the border box of text

where text is a Text node. In CSS elements can have border boxes but text cannot. See https://www.w3.org/TR/css-display-3/#intro which defines boxes (for elements and pseudo-elements, plus anonymous boxes) and https://drafts.csswg.org/css-box-3/#border-box which defines a "border box", but only for boxes, not text runs.

@bzbarsky
Copy link
Author

@hawkinsw @npm1

@npm1
Copy link
Collaborator

npm1 commented Aug 14, 2019

Hmmm I wonder if there is no CSS box which specifies the content size of a text node or text run then?

@bzbarsky
Copy link
Author

I don't believe there is, but it's worth checking with the CSSWG.

Note also that if you have something like <span>text</span> then the content box of the span may not contain all of the bits the text paints. See https://drafts.csswg.org/css-overflow-3/#ink for some examples. It's not clear to me whether you'd want to include such bits in the rectangle you want here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants