W3C home > Mailing lists > Public > www-svg@w3.org > August 2015

Re: Inline SVG: Embedded vs. Metadata Content Distinction (Was: Fwd: [whatwg] Allow Select SVG Elements In <head>)

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Sat, 29 Aug 2015 07:58:02 +0200
Message-ID: <CAAWBYDCkpq9GvZu6fYm7FjOrpinVbaejkw9neomCkx=VugRedg@mail.gmail.com>
To: Hugh Guiney <hugh.guiney@gmail.com>
Cc: www-svg <www-svg@w3.org>, whatwg <whatwg@whatwg.org>, Cameron McCormack <cam@mcc.id.au>
On Sat, Aug 29, 2015 at 12:51 AM, Hugh Guiney <hugh.guiney@gmail.com> wrote:
> Bueller...? Bueller...?
> This request is almost 5 years old now, but it is even more relevant today,
> now that web developers are increasingly embracing SVG for purposes of
> responsive design and accommodating HiDPI displays.
> Putting SVG <defs> and other metadata-related elements in HTML's <head>
> seems like an obvious choice from a semantic standpoint. But it is currently
> illegal in the HTML spec because SVG does not distinguish between embedded
> and metadata content models for its elements, which Hixie has requested so
> that the HTML spec can simply point to the SVG spec's definitions. (Please
> see quoted text.)
> Again, is this something the SVG WG is willing to do?

This isn't even something for the SVGWG to decide; it's simply
impossible to add new elements to HTML's <head>.  <head> autocloses
when it sees any element that's not <title>, <meta>, <link>, <script>,
or <style>, and people depend on this behavior - there's definitely
pages out there where an <svg> element is the first content and needs
to be displayed.

Just put a <defs>-only <svg> in the <body>.  Its location doesn't
actually matter, it's fine.

Received on Saturday, 29 August 2015 05:58:50 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:55:02 UTC