W3C home > Mailing lists > Public > www-style@w3.org > May 2016

Re: [css-overflow] A question about overflow-x and overflow-y

From: Florian Rivoal <florian@rivoal.net>
Date: Tue, 31 May 2016 10:10:20 +0900
Cc: www-style list <www-style@w3.org>
Message-Id: <6999C8BE-3615-40B4-94DB-5A665A4D1C7E@rivoal.net>
To: Justice <justice360@gmail.com>

> On May 30, 2016, at 18:24, Justice <justice360@gmail.com> wrote:
> Hi,
> According the spec, for the same element, the computed values of these two props cannot be visible+hidden at the same time. Does anybody know why it is designed this way? Or it's just because of compatibilities?

Besides history and compatibility requirements, I think the two main reasons are:

* overflow: hidden does more than just hide the overflow, it also makes turns the element into a Block Formatting Context (Floats don't escape, margins of children don't collapse with margins of parents...). Being a BFC in one dimension only is not a thing that exists.

* if an element could be overflow-x: visible and overflow-y: scroll, you would have a vertical scrollbar on the right (typically) side of the element, overlapping with the visibly overflowing content in the inline direction, which is terrible. Same for visible + auto. This isn't necessarily a problem for visible+hidden, but at least it explains why the other values cannot be combined with visible.

 - Florian
Received on Tuesday, 31 May 2016 01:10:46 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:59 UTC