Skip to content

maybe allow transforms on nested svg markup #2109

@pkra

Description

@pkra

Summary

I filed w3c/svgwg#1139 because validator was flagging a transform on nested svg tags.

URL for document that reproduces the problem

n/a

HTML/CSS/SVG snippet that reproduces the problem

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>test</title>
</head>
<body>
<svg xmlns="http://www.w3.org/2000/svg"
  xmlns:xlink="http://www.w3.org/1999/xlink">
  <svg x="10" transform="rotate(-10 50 100)">
    <rect x="10" y="10" height="100" width="100" style="stroke:#ff0000; fill: #0000ff"/>
  </svg>
</svg>
</body>
</html>

Checker error messages

Error: Attribute transform not allowed on element svg at this point.

Spec links/citations

But it looks like SVG2 has allowed this back in 2011, cf. Annotation 1 at https://w3c.github.io/svgwg/svg2-draft/single-page.html#struct-SVGElement.

(However, as I noted in the linked svgwg issue, webkit does not seem to support it.)

Steps to reproduce

Check the snippet.

Expected behavior

No warning.

Actual behavior

Warning.

Screenshots or screen recordings

PS: This issue template is overly annoying to fill out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions