Re: [css-writing-modes] 'writing-mode' and deprecated SVG values

> On Aug 26, 2015, at 3:52 AM, fantasai <> wrote:
> Forgot to CC SVG... also correction to the last item.
> On 07/27/2015 04:10 AM, Dirk Schulze wrote:
>> Hi,
>> The CSS3 Writing Mode spec currently says:
>> "These values are deprecated in any context except SVG1 documents. Implementations
>> that wish to support these values in the context of CSS must treat them as follows”
>> <Table of mapping old value to new values>[1].
>> I have two issues with this:
>> 1) Presentation attributes:
>> In CSS you can usually do things like
>> .class {
>>    writing-mode: tb; /*old SVG values*/
>>    writing-mode: vertical-lr; /*new CSS values*/
>> }
>> For SVG, this would add support for the old values and the new values.
>> However, this is not a possibility in XML with presentation attributes:
>>    <text writing-mode=“tr” writing-mode="vertical-lr”>..</text>
>> would cause an XML parsing error. A attribute can not be declared twice.
>> From Adobe products we know that presentation attribute export is still very
>> popular and you find multiple JS libraries (like SVGO) which transform
>> properties to attributes (even by default).
> I think it would be very easy for a UA to add a ua.css mapping of
>  svg|*[writing-mode=tb] { writing-mode: vertical-rl; }
> to support such content, now and into the future. And I'm happy to add
> a note to Writing Modes clarifying that although these values are
> deprecated in general, content that uses the presentation attributes
> should continue to use the old forms as long as there are UAs out there
> that need them.

All browsers I know have a SVG specific UA style rule with @namespace "”; So it could be generalized to elements in this namespace. 

>> 2) Implementation complexity
>> The spec currently just allows the values for SVG documents. It can not be
>> determined at parse time if a property inheriting element will be in an
>> HTML or an SVG context. (See inline SVG.) So the first sentence is actually
>> hard to implement since the parser needs to accept the SVG values initially
>> and then needs to verify if they apply to a certain element or not. A valid
>> parsing is prohibited at the same time by the spec though.
> The spec does not require any sort of context-dependent parsing. It says
> "These values are deprecated in any context except SVG1 documents." which
> means "Don't use them anywhere except SVG1 documents." Deprecated features
> must still be supported.

The last sentence would rule out the usage of the deprecated values in inline SVG (SVG content in a HTML document). Or do I misinterpret it?


> Please let me know if this resolves your concern.
> ~fantasai

Received on Wednesday, 26 August 2015 08:18:47 UTC