Re: [csswg-drafts] [css-scroll-anchoring-1] `display: flex` can't be selected as an anchor node (#3478)

Relatedly: what about `<span>` with `display:inline`? That's definitely not a "block box", and definitely not a "text node" (though it kind of lays out like one, e.g. getting split across lines of its containing block).

And what about form controls, e.g. `<button>` and `<input>`?  What about `<img>`?  None of these are "block boxes" nor "text nodes".

Right now the spec defines its term `scroll anchoring bounding rect of a DOM node N` in such a way as to assume that every node `N` **must** be either a "block box" or a "text node", but clearly that's inaccurate/incomplete.

Here's the problematic spec text from the bottom of section 2.1 (bulleting added for emphasis):
> The scroll anchoring bounding rect of a DOM node N is
>  * N’s scrollable overflow rectangle if N is a block box,
>  * or the bounding rect of its line boxes if N is a text node. 

This leaves this rect undefined for most DOM nodes (everything with `display: [anything but block]`).

This spec text needs fixing to clarify what it actually intends to say and to ensure this rect is actually defined for all DOM nodes.

-- 
GitHub Notification of comment by dholbert
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3478#issuecomment-451582231 using your GitHub account

Received on Friday, 4 January 2019 22:05:16 UTC