W3C home > Mailing lists > Public > www-style@w3.org > August 2012

box-sizing + intrinsic dimensions

From: Ojan Vafai <ojan@chromium.org>
Date: Tue, 7 Aug 2012 12:39:28 -0700
Message-ID: <CANMdWTvMqmAKOyjaajQE+XZrAd7AHTN+wUSM5XfG7PtLbio1zQ@mail.gmail.com>
To: www-style@w3.org

How should box-sizing affect things that are sized based off intrinsic
dimensions? Using a box-sizing other than content-box does weird things.

1. <div style="box-sizing: border-box; border: 2px solid; width:

I believe we'd calculate the width as the width of "foo" and then use that
as the border-box size, which would get you a border that overlaps the text
(i.e. the text would overflow).

2. <div style="width:100px"><div style="box-sizing: border-box; border: 2px
solid; width: fill-available">foo</div></div>

As I read the spec, the border box of the inner div would get set to 96px
and it wouldn't actually fill the container.

I suppose you're just getting what you ask for here? I'm not sure it's
worth adding magic to fix these cases. Just want to make sure these cases
are considered so we can safely ship the intrinsic sizing keywords
unprefixed in the near-term.

Received on Tuesday, 7 August 2012 19:40:17 UTC

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