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

Thank you for investigating this issue and write up.

On Mon, Jul 27, 2015 at 5:10 PM, Dirk Schulze <dschulze@adobe.com> 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).
>
> 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.
>
>
> For backward compatibility (WebKit and Blink support the old property
> values for SVG text) I would like to suggest to make them deprecated but
> mandatory. All values must be mapped as suggested by the spec currently.
>
> For tool creators and libraries it is just not possible to address
> browsers with full CSS3 Writing Mode support, browsers based on current
> WebKit and Blink as well as older (often proprietary) SVG viewers at the
> same time.
>
> Greetings,
> Dirk
>
> [1] https://drafts.csswg.org/css-writing-modes-3/#svg-writing-mode


I'm good with the proposal. Gecko and Trident already handle them as value
aliases. I'm still under planning of how to unprefix writing-mode in Blink,
but I think what Gecko did is the only reasonable choice.

/koji

Received on Monday, 27 July 2015 13:33:16 UTC