Closed
Bug 1511236
Opened 7 years ago
Closed 7 years ago
There's a clip-path usage example that doesn't work, and doesn't exist in the W3C specifications
Categories
(Developer Documentation Graveyard :: CSS, enhancement, P1)
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: kyle, Assigned: eweyl)
References
()
Details
:: Developer Documentation Request
Request Type: Correction
Gecko Version: unspecified
Technical Contact:
:: Details
Theres an example of how to use clip-path: path() on the page: https://developer.mozilla.org/en-US/docs/Web/CSS/clip-path
The example shows that you can inline SVG path coordinates straight into path()
Exact example shown on the page: clip-path: path('M15,45 A30,30,0,0,1,75,45 A30,30,0,0,1,135,45 Q135,90,75,130 Q15,90,15,45 Z')
The example includes two boxes below it, showing that the example doesn't work as it's not drawing the path. This usage of clip-path appears to not work on any currently available browser and no documentation outside of this page references that type of usage. The W3C specs linked on this page also don't mention it at all.
Currently the only way to render a CSS clip-path by using path() is to include a selector that references an actual SVG element, or alternatively a URL to an SVG file. It is not possible to pass SVG path coordinates straight into path() the way its being described on this page.
Updated•7 years ago
|
Assignee: nobody → eweyl
Priority: -- → P1
| Assignee | ||
Comment 1•7 years ago
|
||
Really appreciate you getting in touch with us about this feature. This is a unique one. SVG style paths as a value for in HTML is defined in the CSS Shapes level 2 spec: https://drafts.csswg.org/css-shapes-2/#funcdef-path
path()
= path( [<fill-rule>,]? ) Where the string can represent an SVG Path data string. The path data string must be conform to the grammar and parsing rules of SVG 1.1. The initial position is defined by the first “move to” argument in the path string. For the initial direction follow SVG 1.1.
Looking at the compat table, it's behind a flag since FF63. To make it work, you have to switch a flag. In Firefox 63 or later, visit about:config, and switch layout.css.clip-path-path.enabled to true.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•