Re: [whatwg] 2D canvas feature proposal: text decoration

On Thu, Apr 18, 2013 at 4:42 PM, Rik Cabanier <cabanier@gmail.com> wrote:
> On Thu, Apr 18, 2013 at 4:18 PM, Tab Atkins Jr. <jackalmage@gmail.com>
> wrote:
>> On Thu, Apr 18, 2013 at 3:40 PM, Rik Cabanier <cabanier@gmail.com> wrote:
>> > I think that all enumerated DOMStrings in CanvasDrawingStyles should
>> > move
>> > to enums. This seems cleaner and have no compatibility issues.
>> > However, if we keep them as DOMStrings, I agree that textDecoration
>> > should
>> > be one too.
>>
>> If they're trying to take on the value of CSS properties, they should
>> absolutely *not* be enums.  DOMStrings are the correct data type for
>> that.
>
> Why is that? There's no difference to an author.

There is, the moment you have a multi-keyword value.  ^_^

(Also, it lets you more easily just defer to CSS for the
interpretation of the property, rather than having to manually update
the enum when we add new values.)

~TJ

Received on Friday, 19 April 2013 02:36:19 UTC