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: sam <samuelp@iinet.net.au>
Date: Fri, 30 Apr 2010 18:08:37 +0800
Message-ID: <4BDAAC25.8060208@iinet.net.au>
To: Gabriel Zackari <gabriel.zackari@gmail.com>
CC: www-style@w3.org
On 04/29/2010 10:14 PM, Gabriel Zackari wrote:
> Im not sure this is the right place to suggest new CSS attributes if 
> not please excuse me:
>
> What I would like is an attribute that makes a text allways fill keep 
> the same size as that of the box its in.
>
> Today its possible to have an image stretch with the size of a box but 
> not text that is place in the box, its allways static. However text is 
> rendered from vector so
> it should be possible to make its follow the size of another object.
>
> So if the size of the box is made smaller the text size would 
> automatically adjust and would not overflow and having to be hidden.
> And if the size of the box is bigger the size of the text will fit and 
> you would not have to go back and perhaps create a new css style to 
> adjust the size of the text.
>
> Example of use:
>
> Very useful when making buttons of different sizes.
> The text would allways keep to the size of the button.
>
> Regards Gabriel
>
>
>
>
So what is really being asked for is the ability lock a block's 
font-size to its height: this.font-size = this.height ...
Received on Friday, 30 April 2010 10:09:12 GMT

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