W3C home > Mailing lists > Public > public-css-archive@w3.org > October 2020

Re: [csswg-drafts] [css-contain-2] Spec is unclear about whether 0-sized boxes can be "relevant to the user" (since they have zero intersection area) (#5641)

From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
Date: Mon, 26 Oct 2020 20:25:02 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-716802152-1603743901-sysbot+gh@w3.org>
I think a reasonably intuitive knot-cutting here would be:

* if the intersection has non-zero area, the element is on-screen
* if the intersection has zero area, but the element's bounds are in the (exclusive) range of the viewport's bounds, it's on-screen

This answers your questions with no, yes, yes, yes.  

The intuition here is that for nonzero-area boxes, we just use the standard "intersection area is nonzero" logic, answering (1). For zero-area boxes, they're on-screen *if* we could shift one of the edges by epsilon and give it a nonzero intersection area, answering (2) and (4).  (With the special case of both being 0x0 and coincident, which falls under the general consistency that a 0x0 box at (0,0) is always on-screen, answering (3).)

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

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 26 October 2020 20:25:04 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:21 UTC