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

> -----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