Re: [css-sizing]? Scrollbars and preferred width

On Wed, Nov 25, 2015 at 12:17 PM, Christian Biesinger <cbiesinger@google.com
> wrote:

> In Chrome and Firefox, at least, the first box gets a horizontal
> scrollbar because the preferred width does not include the width of
> the vertical scrollbar for overflow: auto. This makes sense because to
> determine whether a scrollbar is needed, the box has to be laid out,
> and the preferred width can't depend on layout. Conversely, at least
> in Chrome (haven't tested other browsers), the scrollbar does get
> included if it's overflow:scroll.
>

Firefox does that too.


> But my question is, is this behavior specified? (and correct? :) )
>

I don't think it's specified anywhere. I've never been able to think of a
better behavior that doesn't require an extra layout pass to determine the
preferred width.


> (Also, I was surprised when I realized that the scrollbar gets placed
> within the content box, ie. width: 100px gets reduced by the scrollbar
> size. Is that, too, specified?)
>

I don't think so, but I'm pretty sure it's necessary for Web compatibility.

Rob
-- 
lbir ye,ea yer.tnietoehr  rdn rdsme,anea lurpr  edna e hnysnenh hhe uresyf
toD
selthor  stor  edna  siewaoeodm  or v sstvr  esBa  kbvted,t
rdsme,aoreseoouoto
o l euetiuruewFa  kbn e hnystoivateweh uresyf tulsa rehr  rdm  or rnea
lurpr
.a war hsrer holsa rodvted,t  nenh hneireseoouot.tniesiewaoeivatewt sstvr
esn

Received on Wednesday, 25 November 2015 03:58:40 UTC