W3C home > Mailing lists > Public > www-style@w3.org > December 2017

Re: [css-sizing-3] Major update to fold in width/height & box-sizing propdefs

From: Florian Rivoal <florian@rivoal.net>
Date: Tue, 5 Dec 2017 19:42:27 +0100
Cc: "www-style@w3.org" <www-style@w3.org>, Boris Zbarsky <bzbarsky@MIT.EDU>
Message-Id: <BC3F3921-F018-4E8B-957B-545D359485C2@rivoal.net>
To: fantasai <fantasai.lists@inkedblade.net>
Thanks a ton.

A few comments:

* The "Module Interactions" section should say box-sizing in css-sizing
supersedes the box-sizing section of CSS-UI-3.

* You've kept (with phrasing improvements that look good to me) the high
level description of box-sizing, but not the part when it explicitly
disambiguates the visual formatting model details of CSS21.

Granted, that text was an ugly monkey patch, and can be derived from the
high level principles which you do list, but it had been explicitly
requested (by Boris Zbarsky IIRC) so that readers of the box-sizing could
be confident that we had reviewed the visudet text and confirmed line
by line how it was meant to be read under box-sizing:border-box,
so that they did not have to try and second guess us.

I believe that the worry was that the word "width" (and height,
and min-width, and max-width, etc) might be used in some places to refer
to the value of the property instead of inner size.

I believe the prose you have is correct without that tedious enumeration,
but there was a reason for writing it in the first place,
so I want to make sure we are not dropping that text by accident.

* Going forward, to avoid risks and worries about this ambiguity,
how about using "the value of the width/min-height/max-inline-size property"
or "the inner/content width/min height /max inline size" as appropriate,
rather than just "the width / min height / max inline size", which
can seem to ambiguously refer to either?

It's more verbose than what you're proposing to do, but it seems
to me that it would be less at risk of misuse.

For instance, the spec currently says:
"The min-width and min-height properties specify the minimum width
and minimum height". "minimum width" and "minimum height" in that
sentence are the anchoring definitions for these terms, so it could
seem that they are meant to be synonymous with the value of the respective
properties. You need to read some other part of the spec to be told that
they "refer to the inner (content box) size unless otherwise specified."
As the definition of box-sizing does specify that under border-box,
"sizes specified on sizing properties as <length-percentage> represent
outer sizes", we fall back on our feet and I agree that the current way
it is specified is correct. But it just seems to easy to get wrong.

So I'd suggest defining, as you do now, the short version to mean the
inner size unless specified otherwise, as it is needed to read old specs,
but also warning spec authors against using them going forward, and
defining (and using) the longer and more explicit terms.

* Regardless of wether you agree with me in the previous point,
or want to stick with "the minimum width" to be the anchor term,
could you define (either in that spec or in css-logical) the
corresponding logical terminology?


> On Dec 5, 2017, at 3:10, fantasai <fantasai.lists@inkedblade.net> wrote:
> Tab and I just pushed a major reorganization of the the former “New Sizing Keywords”
> chapter of CSS Sizing Level 3:
>  https://www.w3.org/TR/2017/WD-css-sizing-3-20170207/#size-keywords
> The new text is available in the editor's draft here:
>  https://drafts.csswg.org/css-sizing-3/#specifying-sizes
> The changes are:
>  * Fold in the full propdef tables for width/height/min-width/min-height/max-width/max-height.
>  * Add definitions for the <length-percentage> and auto/none values for completeness.
>  * Copy over the box-sizing definition from CSS UI and clean it up a bit.
> What this means:
>  1. We have Level 3 cross-linkable spec text for the sizing properties and their values.
>  2. We have <dfn> anchors for width/height, minimum width/height, maximum width/height,
>     and their abbreviations min width/height and max width/height. We'll add more for
>     any other related terms that need anchors.
>  3. We have a new term, “automatic size”, which represents the ''auto'' keyword.
>     The various bits of “behaves as auto” awkwardness can just link to that now.
>  4. We moved over the <dfn>s for the min-width/height 'auto' keyword and the term
>     “automatic minimum size”. What it means (other than computing to zero unless
>     otherwise defined) is still in the Flexbox/Grid specs as before.
> Remaining work:
>  We still don't have anchors for content box / border box / padding box / margin box:
>    https://www.w3.org/TR/CSS2/box.html#box-dimensions
>  It's not clear where those should go, but if they belong in Sizing we might want to
>  copy them over.
> RFC:
>  We encourage anyone to take a look at the updated prose and report any problems.
>  We're hoping to publish a updated WD with the changes for wider review shortly.
>  The only other significant open issues are about the min-content contribution of
>  scrollable elements: https://github.com/w3c/csswg-drafts/issues/1865
>  and the behavior of 'min/max-width/height: <percentage>' under shrinkwrap:
>  https://github.com/w3c/csswg-drafts/issues/1132
> ~fantasai
Received on Wednesday, 6 December 2017 01:33:33 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:09:09 UTC