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

Re: [whatwg] Allowing authors to obtain a vertical <input type=range>

From: Simon Pieters <simonp@opera.com>
Date: Tue, 26 Mar 2013 16:19:46 +0100
To: "Jonathan Watt" <jwatt@jwatt.org>
Message-ID: <op.wuj7i8u9idj3kv@simons-macbook-pro.local>
Cc: whatwg@lists.whatwg.org
On Tue, 26 Mar 2013 16:05:58 +0100, Jonathan Watt <jwatt@jwatt.org> wrote:

>> I don't have strong opinions on this topic, however, if we are going to
>> add an attribute, it would be less verbose to use a boolean attribute:
>>
>>      <input type=range vertical>
>
> My original approach for supporting vertical range was to have Mozilla's  
> -moz-orient CSS property apply to <input type=range>, but the initial  
> value of this property was 'horizontal'. That prevented the  
> auto-orientation hinted at in the HTML5 spec (and implemented by Opera)  
> where the orientation of the range is based on the width-to-height ratio  
> of the input, unless explicitly specified by the author. To fix that I  
> added an 'auto' value for -moz-orient and made that the initial value.  
> Then I realized that authors will want to style the component parts of a  
> range differently based on whether it is vertical or horizontal, which  
> is incompatible with using a CSS property to specify the orientation.  
> That's how I arrived at using an attribute, and it's to leave open the  
> future possibility of auto-orientation that I made a direct conversion  
> to an 'orient' attribute rather than a 'vertical' attribute.

Is 'auto' useful in practice? Is it a behavior that authors or users  
expect? I don't know, but my hunch is "no", and it would be more  
straightforward to just use horizontal and let the author opt-in to  
vertical with the attribute.

-- 
Simon Pieters
Opera Software
Received on Tuesday, 26 March 2013 15:20:21 GMT

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