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: Mon, 14 Mar 2011 19:37:43 +0100
Message-ID: <F711F794-F339-4007-AE55-063095843B9B@crissov.de>
Christoph P?per (2011-03-05):

> Thus, would it make sense to add another new type for the ?input? element?

A new type is probably not necessary, because a new attribute that is called something like ?unit? and is only valid in the ?number? and ?range? states could be enough. 

  <input type="number" id="fontsize" value="12" unit="pt">

This solution would be perfectly backwards compatible, because non-supporting UAs simply wouldn?t use, change and transmit ?unit? and therefore the server can safely assume the default.

I?m not sure, though, how UAs are supposed to know which other units could be substituted ? standard abbreviations perhaps: reference CSS3 Values or SI / ISO/IEC 80000.

<http://www.whatwg.org/specs/web-apps/current-work/multipage/number-state.html>
Received on Monday, 14 March 2011 11:37:43 UTC

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