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

Re: [css3-writing-modes] auto-sizing orthogonal flows shouldn't restrict to the fill-fallback size

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 13 Nov 2012 10:15:10 -0800
Message-ID: <CAAWBYDC_p=CrTjrqD-m0oubkYpQJ8=ZGaZ-=oW1jVznTZGfMAg@mail.gmail.com>
To: Ojan Vafai <ojan@chromium.org>
Cc: "www-style@w3.org" <www-style@w3.org>
On Fri, Nov 9, 2012 at 4:20 PM, Ojan Vafai <ojan@chromium.org> wrote:
> http://dev.w3.org/csswg/css3-writing-modes/#orthogonal-auto
>
> "min(max-content, max(min-content, min(fill-available, fill-fallback))),
> where:
> min-content
>     the min-content measure of the element
> max-content
>     the max-content measure of the element
> fill-available
>     the fill-available fit into the element's containing block's size in the
> element's inline axis
> fill-fallback
>     the fill-available fit into the initial containing block's size in the
> element's inline axis"
>
> I don't think restricting to always be the smallest of
> fill-available/fill-fallback makes sense. In fact, I don't see why it's not
> always just the fill-available size of the containing block. The point of
> this approach is to make it so that line-wrapping does something reasonable.
> IMO, line-wrapping should do something analogous to what it does in
> horizontal writing mode if you have a definite width that is larger than the
> viewport (e.g. if you set the width larger than the viewport, we don't
> restrict line-wrapping to the viewport width).

It's fine to let the "normal" case fail the line-length test because
that almost never happens by accident.  If an element is wider than
the viewport, it's usually because you intended it to be that way.

On the other hand, it's very easy to accidentally trigger this bad
case with orthogonal flows.  In fact, it's practically the *default*
with them.  That's why we go to efforts to try and ensure that (a) the
line length isn't larger than the screen (so you don't have to scroll
back and forth to read text) and (b) block-flow elements don't go off
the side of the page.  (a) is accomplished by limiting auto-sizing to
the viewport size, and (b) is done by automatically turning on
multicol.

> <div style="height: 1000px">
>     <div style="writing-mode:vertical-lr">a bunch of text that
> wraps...</div>
> </div>
>
> In that case, even if the viewport is 500px, I think height of the vertical
> writing-mode div should be 1000px. The author is explicitly asking for this.
> I don't see why we'd restrict it. If we're auto-sizing all the way up the
> tree, the fill-available height will be sized to the viewport size. So it
> still meets that use-case.
>
> FWIW, I have a webkit patch up to implement the fill-available approach. I
> wrote this up before the spec changed to the above.
> https://bugs.webkit.org/show_bug.cgi?id=93655

The spec (Writing Modes) has required this exact approach for a long
time.  The only recent change we've made is to rework the text to
refer to the stuff that's been pulled and refactored into the Sizing
spec.

> P.S. The "fill-available fit" links are to
> http://www.w3.org/TR/css3-sizing/#fill-available-fit, which don't match
> anything in the TR version of the sizing spec. Can we not link to the dev
> version?

The link'll point properly when we next publish.  (Eventually we'll
have cross-spec cross-references, and we won't have to decide whether
to point to the dev or TR - it'll point properly every time we regen.)

~TJ
Received on Tuesday, 13 November 2012 18:16:09 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:02 GMT