WICG / element-timing

A proposal for an Element Timing specification.
https://wicg.github.io/element-timing/
Other
58 stars 15 forks source link

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

Open bzbarsky opened 4 years ago

bzbarsky commented 4 years ago

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 commented 4 years ago

@hawkinsw @npm1

npm1 commented 4 years ago

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

bzbarsky commented 4 years ago

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.