W3C home > Mailing lists > Public > www-style@w3.org > May 2015

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 7 May 2015 10:58:45 -0700
Message-ID: <CAAWBYDCmXqRG3bMdPp_wM=3gQnPFgCQeFBP=ukmE1+B0MwxbDg@mail.gmail.com>
To: fantasai <fantasai.lists@inkedblade.net>
Cc: Jonathan Kew <jfkthame@gmail.com>, Koji Ishii <kojiishi@gmail.com>, "www-style@w3.org" <www-style@w3.org>, SVG WG <w3c-svg-wg@w3.org>, Brady Duga <duga@google.com>, www-svg <www-svg@w3.org>
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 17:59:32 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:54 UTC