Re: SVG-ISSUE-2433 (text-direction): consider adding dir="" attribute for specifying base text direction [SVG 2]

Tab Atkins Jr.:
> HTML doesn't have a direction property, it only has @dir. On the
> layout level, @dir maps to the 'direction' property for display
> purposes.

By HTML having a direction property I meant that CSS has it, so it can 
be applied to HTML content.

> Adding 'direction' to CSS in the first place was a mistake - we did it
> to let arbitrary XML languages declare bidirectional content, since
> XML didn't have a native @dir attribute.  HTML content should never
> use 'direction' at all, and it would be ideal for SVG to define a
> native direction property as well.
>
> Just change the current @direction attribute into a semantic
> attribute, rather than a display one.

One difference between dir="" and direction is that the former has an 
"auto" value that the latter doesn't.  Also, I don't think we should 
break the correspondence between the names of properties and of the 
presentation attributes if we can help it.  If the direction property is 
not going away, I think the right thing to do is to keep direction="" as 
a presentation attribute for the direction property and add dir="" as 
the attribute that can take ltr/rtl/auto values.

Received on Tuesday, 31 January 2012 20:49:31 UTC