W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2011

[whatwg] Form input element for value-unit pairs

From: Christoph Päper <christoph.paeper@crissov.de>
Date: Sat, 5 Mar 2011 18:26:52 +0100
Message-ID: <D1BC7E70-589D-420B-87BB-5E4AB13BEA7D@crissov.de>
Imagine a richt text processor done in HTML5. If you want to select the font size (of a template or class, of course) how would you do it? 

Standalone word processors usually have a combo field that lets the user enter a number


possibly adding controls for increasng and decreasing

  [12]?    [12]?

or they may allow the user to select one of the predefined recommended or frequent values. 

  [12 ?]

These are commonly using, without explicitly mentioning it, the magic unit ?point?, which users usually don?t know, especially if they?re not from the US and are not trained typographers.

In other places, software interface designers honor the variety of absolute and relative (length) units by introducing a widget that bears the number and the unit symbol, 

  [12 pt]?

which can both be changed, although not independently.

?pt???px? ? [12 px]  not  [16 px]

Some implementations are even broken in that they accept many unit symbols, but always autoconvert (and round) to a preferred unit.

  [4 mm] ? [11.34 pt]

Thus, would it make sense to add another new type for the ?input? element?
Received on Saturday, 5 March 2011 09:26:52 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:31 UTC