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

RE: Suggestion: A new text attribute to scale the size of text to follow ?the size of a box

From: Belov, Charles <Charles.Belov@sfmta.com>
Date: Thu, 29 Apr 2010 10:30:27 -0700
Message-ID: <E17F75B6E86AE842A57B4534F82D03769C2801@MTAMAIL.muni.sfgov.org>
To: "Brad Kemper" <brad.kemper@gmail.com>, "Gabriel Zackari" <gabriel.zackari@gmail.com>
Cc: <www-style@w3.org>
> -----Original Message-----
> From: www-style-request@w3.org 
> [mailto:www-style-request@w3.org] On Behalf Of Brad Kemper
> I think I would call this 'font-size: auto', where 'auto' 
> meant that largest size possible without breaking (except 
> where explicitly broken by, say, a <BR> or by 'white-space: 
> pre') and without overflowing. Most of the time this would be 
> a horizontal constraint, but a fixed height could also 
> constrain it. It would also mean there was no difference 
> between 'whte-space:normal' and 'white-space:nowrap', and 
> 'text-overflow' would never kick in.
> On Apr 29, 2010, at 7:14 AM, Gabriel Zackari wrote:
> > What I would like is an attribute that makes a text allways 
> fill keep the same size as that of the box its in. 
> > 
> > Example of use:
> > 
> > Very useful when making buttons of different sizes. 
> > The text would allways keep to the size of the button.
> > 

There is an accessibility issue in that font sizes that are too small or
too large may be hard for some people to read.  Both Firefox and Safari
allow the site visitor to set a minimum font size (but, oddly, no
maximum font size), and Internet Explorer has an accessibility setting
that allows the site visitor to ignore font sizes set by the Web site.

Therefore, anyone using this CSS feature would have to allow for the
possibility that this feature was ignored.

If text-overflow was ignored, then a design counting on this feature
would break (cause overprinting of one text element over another) for
site visitors needing a larger font size.

Hope this helps,
Charles Belov
SFMTA Webmaster
Received on Thursday, 29 April 2010 17:33:51 UTC

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