-
Notifications
You must be signed in to change notification settings - Fork 758
Description
Currently, the grammar for clip-path is:
clip-path = none | <url> | [ <basic-shape> || <geometry-box> ]
whereas the grammar for motion-path is:
motion-path = none | [ [ <ray()> | <url> | <basic-shape> ] || <coord-box> ]
Ignoring the addition of ray(), the two differ in two ways:
clip-pathuses<geometry-box>vs.motion-pathwhich uses<coord-box>. (this meansclip-pathallows an extra keyword,margin-box)clip-pathdoes not allow a reference box to be specified with a<url>vs.motion-pathdoes allow a reference box to be specified with a<url>.
I propose we change clip-path to allow specifying both a <url> and a <geometry-box>, updating its grammar to:
clip-path = none | [ [ <url> | <basic-shape> ] || <geometry-box> ]
It would also be expanded to allow referencing either a clipPath element or, like motion-path, "an SVG shape element".
Like with motion-path, the reference box for a <url>, "defines the viewport and user coordinate system for the shape [or clipPath] element, with the origin (the 0,0 point) at the top left corner, and units being 1px in size."
Additionally, I propose a change to motion-path to use <geometry-box> instead of <coord-box> for its reference box, updating its grammar to:
motion-path = none | [ [ <ray()> | <url> | <basic-shape> ] || <geometry-box> ]
With margin-box now a supported reference box.