W3C home > Mailing lists > Public > www-style@w3.org > July 2015

Re: [css-overflow] interaction between "overflow-x" and "overflow-y", when one of them is "clip"

From: Florian Rivoal <florian@rivoal.net>
Date: Thu, 30 Jul 2015 17:00:56 +0200
Cc: Daniel Holbert <dholbert@mozilla.com>, www-style list <www-style@w3.org>
Message-Id: <49261E59-2282-4E7F-BC56-D0FD7889C609@rivoal.net>
To: "Tab Atkins Jr." <jackalmage@gmail.com>

> My take is that we have a 3 potential ways forward:
> 
> 
> A) "overflow: clip" is a paint only operation, it does not (on its own) create a BFC, and if "contain" is not "paint", you can have "overflow-x:clip" in one dimension and "overflow-y:visible" (and vice versa). Amend the definition of "resize" and "text-overflow" (and anything else that depends on "overflow") to deal with the new possibility of being visible in one dimension only.
> 
> B) Rename to "overflow: hidden no-scroll". It creates a BFC. If you specify it in one dimension only and leave the other visible, the visible one computes to auto.
> 
> C) Don't introduce a new value to overflow, make "contain:paint" cause "overflow:visible" to compute to "overflow:hidden", and implement heuristics to detect when browsers should avoid allocating the resources needed to do the scrolling.

So we resolved on B, modulo bikesheding.

Top alternatives for now are:
 - overflow: clip
 - overflow: hidden no-scroll
 - overflow: none

The spec currently says clip, but I'm happy to change to one of the other 2 (or other suggestions) if people think that will lead to confusion with the clip / clip-path properties, or just like another name better.

We're left with this question:

> Should contain:paint cause overflow:visible to compute to overflow:auto, making sure that no overflowing content gets lost, but requiring the author to explicitly activate overflow:clip in order to get all optimizations, or should it cause overflow:visible to compute to overflow:hidden no-scroll, giving maximum optimizations in a single switch, but at the risk of dropping content if the author had not anticipated that his element might overflow?

I favor auto, Tab "STRONGLY disagree"d.

And, if we don't pick "computes to auto" as the answer to that question, we also need to answer this one.

> We need to decide between 2 variants, If we have "contain:paint; overflow-x:visible; overflow-y:something-else;"
> 
> B1 => overflow-y:something else acts first, and overflow-x is auto
> 
> B2 => contain:paint acts first, and overflow-x is "hidden no-scroll"

To avoid loosing content accidentally when the author did not anticipate overflowing, I strongly favor B1. Tab agreed.

 - Florian
Received on Thursday, 30 July 2015 15:01:34 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:32 UTC