Re: [css3-text] Balance Text proposal

On 1/30/13 3:55 PM, "Scott Johnson" <sjohnson@mozilla.com> wrote:

>
>
>
>Hi Randy:
>
>I'm wondering whether your proposal will affect pagination of text.
>
>Specifically, I'm thinking of a case where we had two pages (or perhaps
>columns, if that's easier to think about), such that the text-wrap would
>make one column more narrow, does this affect balancing of columns?
>
>~Scott

Scott,

The page that Randy linked describing the algorithm covers this - take a
look at the "Container Size" section:

---
This algorithm does not affect the width or height of the containing
element as this may affect rendering of the rest of the document. The
resulting text will always wrap to same number of lines as original text
 so height doesn't change. Line width of resulting text should not
exceed container size to width doesn't change. It only affects where
line breaks occur.

One exception to this may be shrink-to-fit containers.
---


So page and/or column width should not be affected. We'd need to decide
whether shrink-to-fit containers would respond to the possibly shorter
line lengths.

Thanks,

Alan

>
>Thus Spoke Randy Edmunds:
>
>
>Hi www-style,
> 
>I would like to propose a new value for the text-wrap property:
>'text-wrap:balance'
> 
>The basic algorithm for rendering text is simple: put as much text as
>will fit on each line, with the remainder on the last line. This results
>in the fewest possible lines of text being used, but when a short run
> text (such as in a title) breaks across two lines the result can
>sometimes be visually undesirable.
> 
>When rendering text that spans multiple lines, this feature provides the
>option to automatically balance text across the same number of lines.
> 
>The intended usage for balance text algorithm is for short text elements
>such as headings, blockquotes, labels, and captions. When the algorithm
>is applied to large paragraphs of text, the effort increases and
> the benefit diminishes, so there may need to be a way to specify a
>maximum length of text.
> 
>As an example, take a title that's a little too wide to fit on one line:
> 
>Take a Look at this Balanced
>Text
> 
>with 'text-wrap:balance' specified, the title would be rendered as:
> 
>Take a Look at 
>this Balanced Text
> 
> 
>Therešs a JavaScript polyfill for this:
>
>https://github.com/adobe-webplatform/balance-text
> 
>I also describe an algorithm for implementing this :
>
>http://adobe-webplatform.github.com/balance-text/proposal/index.html
> 
> 
>Regards,
> 
>Randy Edmunds
>redmunds@adobe.com
> 
>
>
>
>
>

Received on Thursday, 31 January 2013 00:10:30 UTC