Skip to content

[css-transforms-1] Define basis for percentage transform on patterns, gradients, clipPath #892

Closed
@smfr

Description

@smfr

http://www.w3.org/mid/9B0DDCB4-B480-471F-943A-C5ED00598DFA@adobe.com

During the FX meeting in Hamburg we resolved that percentage values for the 'transform' property should not be ignored. IIRC we did not resolve if percentage values are relative to:

  • the user space of the referencing object
  • the bounding box of the referencing object
  • the size of the resource (pattern/gradient/clipPath size).

I would like to avoid to use the last item since we do not have a definition for the size of clipPath.

Relative to the bounding box seems more natural to me and would be consistent with percentage values for 'transform' on the object itself.

Here is an example:

<svg width="500" height="500">
<defs>
    <clipPath transform="translate(20%, 20%)" id="clipping">
        <rect width="20" height="20"/>
    </clipPath>
</defs>

<rect width="200" height="200" fill="green" clip-path="url(#clipping)">
</svg>

Going with the first two items of the list, should the clipPath be translated by

  • (100px, 100px) or
  • (40px, 40px)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions