Skip to content

Commit

Permalink
[css-shapes-2] Editorial: Add clarification about relationship with '…
Browse files Browse the repository at this point in the history
…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]>
  • Loading branch information
noamr and tabatkins authored Mar 10, 2025
1 parent 61d88e2 commit e9127f6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion css-shapes-2/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,17 @@ The ''shape()'' Function</h4>
and inherits a number of limitations from SVG,
such as implicitly only allowing the ''px'' unit.

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

In that sense, ''shape()'' is a superset of ''path()''. A ''path()'' can be easily converted to a ''shape()'',
but to convert a ''shape()'' back to a ''path()'' or to SVG requires information about the CSS environment (e.g.
current values of CSS custom properties, current font size for ''em'' units, etc).

<pre class=prod>
<dfn>shape()</dfn> = shape( <<'fill-rule'>>? from <<position>>, <<shape-command>>#)
</pre>
Expand Down

0 comments on commit e9127f6

Please sign in to comment.