W3C home > Mailing lists > Public > www-style@w3.org > April 2010

Fw: Re: Suggestion: A new text attribute to scale the size of text to follow the size of a box

From: Adam Del Vecchio <adam.delvecchio@go-techo.com>
Date: Fri, 30 Apr 2010 13:38:28 -0400
To: "www-style@w3.org" <www-style@w3.org>
Message-Id: <20100430173832.4D5014461@mx1.go-techo.com>

I agree it would be odd to have some text in one size, and some in another. Font-size: fit; should be allowed to be used on any text. We're straying into usability. In some cases, it may be bad usability, but in most, auto scaling text is a good thing to have. It could also be used to fill a 200px by 200px div with justfied text, for example.

To add on to Tab's suggestions, I think this would be useful for article display, h1 display (think blog), and possibly for text boxes. Where the text auto scales to fit the text box, without scrolling. Or until it hits the maximum number of haracters in lets say a text-overflow property, applicable to input boxes only.

Anyway, a bit off topic, but just throwing in some usability and real life examples, at least, where i'd use it.

Adam Del Vecchio (Mobile)
President - Techo TechnologyOn 30 Apr 2010 12:53 p.m., Brad Kemper &lt;brad.kemper@gmail.com&gt; wrote: 

On Apr 30, 2010, at 8:52 AM, Tab Atkins Jr. wrote:

&gt; On Fri, Apr 30, 2010 at 7:17 AM, Bert Bos &lt;bert@w3.org&gt; wrote:

&gt;&gt; Another is to minimize the number of lines, i.e., rather make the text a

&gt;&gt; bit smaller (up to the minimum font size) than add extra line breaks.


&gt; Alternately, forget about scaling text down at all.  Just do linebreak

&gt; calculations like normal, then always scale up to make it fit.


&gt; We'd actually still have to do some downscaling in the case that an

&gt; unwrappable portion is too long, but we could always prefer scaling up

&gt; to fit first.


&gt; I think this would address the use-case of newspaper headlines in

&gt; narrow columns.  You just set a reasonable font-size, and then things

&gt; automatically grow slightly when necessary.

I like this idea. It works more like how regular justification works. And if you want a particular line in larger type, you can add a line break (or span with a bigger font-size).

&gt;&gt; Based on that last option, we considered allowing automatic font sizes

&gt;&gt; *only* on the last line of a block of text, where last line is every

&gt;&gt; line before a forced line break. Hence the keyword 'size' on

&gt;&gt; the 'text-align-last' property. (In the most recent draft, that keyword

&gt;&gt; was again dropped, because of these open issues.)


&gt; This would be acceptable to me if we can't come up with anything else.

I think that would be very strange, typographically, to have several lines in one size and then a huge last line if its a two letter word or nearly the same size if it is nearly a full width line anyway. I don't think it is elegant to say that a line in the middle is a last line because of a BR. That seems rather hackish.

&gt; I think, though, that the only real use-cases are:


&gt; 1) newspaper headlines

&gt; 2) movie posters

&gt; 3) last lines of paragraphs

&gt; 4) single lines of text

For single lines of text, I would prefer something like 'font-size:fit'. The terms better represents the intent of the author. 

If you are going to be manually inserting line breaks (#1 &amp; #2), then 'font-size:fit' and text-align:justify' and 'text-align-last:justify' would do it, without a new property. #3 is just plain weird, IMO.
Received on Friday, 30 April 2010 17:39:08 UTC

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