- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Tue, 6 Oct 2009 09:24:51 -0500
- To: www-style list <www-style@w3.org>
I'd like to propose a new value for the text-overflow property: shrink. This value would, when text overflows its container, reduce the size of the text using whatever methods the UA deems most appropriate (direct font-size reduction, reducing the space between letters, etc.) until the text no longer overflows. This would be useful on my current project, where I have a fixed-width dropdown menu that takes its heading from the selection you make. It's very possible for text that reasonably fits within the menu (at its normal size) to overflow the heading (at an increased font-size and slightly wider font). Flowing down to a separate line is not possible for design reasons, and text-overflow:ellipsis is unacceptable for some of the menus (such as the date selector) that need to present their entire value to be sensical. This property does have the possibility of rendering text completely unreadable by shrinking it too much, of course. I'm not sure if this is actually a problem in practice, or if a simple warning along the lines of "Only use this value when the text is expected to overflow the box only slightly." would be sufficient. (Better ideas for how to solve my given use-case would be appreciated as well, if they exist.) ~TJ
Received on Tuesday, 6 October 2009 14:25:41 UTC