Skip to content

Commit e9127f6

Browse files
noamrtabatkins
andauthored
[css-shapes-2] Editorial: Add clarification about relationship with 'path' (#11743)
* [css-shapes-2] Editorial: Add clarification about relationship with 'path' * Update css-shapes-2/Overview.bs --------- Co-authored-by: Tab Atkins Jr. <[email protected]>
1 parent 61d88e2 commit e9127f6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

css-shapes-2/Overview.bs

+5-1
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,17 @@ The ''shape()'' Function</h4>
147147
and inherits a number of limitations from SVG,
148148
such as implicitly only allowing the ''px'' unit.
149149

150-
The ''shape()'' function uses a set of commands equivalent to the ones used by ''path()'',
150+
The ''shape()'' function uses a set of commands roughly equivalent to the ones used by ''path()'',
151151
but does so with more standard CSS syntax,
152152
and allows the full range of CSS functionality,
153153
such as additional units and math functions.
154154
The commands used by ''shape()'' are dynamically turned into path segments when it is used for rendering,
155155
e.g., when computing the rendered 'clip-path'.
156156

157+
In that sense, ''shape()'' is a superset of ''path()''. A ''path()'' can be easily converted to a ''shape()'',
158+
but to convert a ''shape()'' back to a ''path()'' or to SVG requires information about the CSS environment (e.g.
159+
current values of CSS custom properties, current font size for ''em'' units, etc).
160+
157161
<pre class=prod>
158162
<dfn>shape()</dfn> = shape( <<'fill-rule'>>? from <<position>>, <<shape-command>>#)
159163
</pre>

0 commit comments

Comments
 (0)