W3C home > Mailing lists > Public > www-style@w3.org > January 2014

Re: [css3-box] How do scrollbars affect width calculation?

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Sun, 26 Jan 2014 22:16:23 -0500
Message-ID: <52E5CF87.8070909@mit.edu>
To: Sebastian Zartner <sebastianzartner@gmail.com>
CC: www-style list <www-style@w3.org>
On 1/26/14 3:53 PM, Sebastian Zartner wrote:
> No, I just put Thomas' code into a file. For clarity I attached the file.

Interesting.  So here's a modified version of this testcase that's worth 

<!DOCTYPE html>
<div style="width:20px;padding:20px;overflow:scroll; border: 1px solid 
   <div style="background: green; height: 20px"></div>
<div style="width:20px;padding:20px;overflow:visible; border: 1px solid 
   <div style="background: green; height: 20px"></div>

the actual rendering looks the same across UAs (about 5px for the inner 
div in the overflow:scroll case, for me).  The first getComputedStyle 
returns different values in different UAs, as you note.  The second one 
returns 5px reliably.

I have no idea what browsers are actually doing here.

> Will this behavior change with dropping the '-moz' prefix[1]?

No, since box-sizing is not involved in any way.

Received on Monday, 27 January 2014 03:17:42 UTC

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