Re: [css-writing-modes][svg] Embedded SVG and inheritance

The first thing that struck me here is this isn’t far off from what folks want to be able to do with SVG-in-OT…in that you can have glyphs that inherit their state from their “parent” context.  Having direct SVG inside of HTML, that could potentially inherit the styles - would imply that what is good for one would be good for the other.

Can you explain why this is “unlikely to be web compatible”?  And then if so, why the SVG-in-OT work is acceptable?

Whatever we do for you, we should do for the other - IMO.

Leonard



On 5/7/15, 1:58 PM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:

>On Thu, May 7, 2015 at 10:19 AM, fantasai <fantasai.lists@inkedblade.net> wrote:
>> On 05/07/2015 01:14 AM, Jonathan Kew wrote:
>>> On 7/5/15 05:22, Koji Ishii wrote:
>>>> 2. Does writing-mode: vertical-rl in HTML inherits to SVG?
>>>> [...]
>>>
>>>
>>> ... I agree it might be better to avoid this, as the svg image as a
>>> whole does not rotate. While there may be some cases where an author
>>> would want the text within an svg image to respond to the document's
>>> writing mode, this seems unlikely to be widely useful.
>>>
>>> Perhaps we should simply add
>>>
>>>    svg { writing-mode: initial; }
>>>
>>> to the UA stylesheet? Then an author who *does* want the outside
>>> writing-mode to apply to text within the svg can still use
>>> "writing-mode: inherit" to achieve this.
>>
>>
>> It seems to me that this is a broader problem than just writing-mode.
>> Should 'font-variant: small-caps' inherit into an SVG? What about
>> 'text-emphasis'?
>>
>> It might just make sense for the UA style sheet to include
>>
>>   svg { all: unset; }
>>
>> and then make a per-property exception if necessary for some very
>> specific reason, e.g.
>>
>>   svg { all: unset; color: inherit; }
>>
>> if we want 'color' to inherit by default.
>>
>> The place to make this change would be
>>   * informatively in CSS Cascade Level 3 (as an example appendix)
>>   * normatively in the appropriate SVG specs
>
>This is unlikely to be web-compatible.  You also need to qualify the
>"svg" part significantly; if we could do this, we wouldn't want to hit
>nested <svg> elements, so something like "html|* > svg" would be
>required.
>
>~TJ
>

Received on Thursday, 7 May 2015 19:57:25 UTC