[whatwg] Allowing authors to obtain a vertical <input type=range>
simonp at opera.com
Tue Mar 26 08:19:46 PDT 2013
On Tue, 26 Mar 2013 16:05:58 +0100, Jonathan Watt <jwatt at 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.
More information about the whatwg