Skip to content

Conversation

@noamr
Copy link
Collaborator

@noamr noamr commented Jan 21, 2025

This shows how to use shape() to build a responsive speech bubble clip-path, replacing SVG pixel values with percentage/pixel/calc/CSS variables.

@noamr noamr requested review from bramus and smfr January 21, 2025 10:13
@bramus
Copy link
Contributor

bramus commented Jan 21, 2025

Very clear example. Love how you walk through it from start to finish. Added some minor remarks. Otherwise LGTM.

@noamr noamr merged commit 3492c4a into w3c:main Jan 21, 2025
1 check passed
@noamr noamr deleted the shape-example branch January 21, 2025 11:46
@smfr
Copy link
Contributor

smfr commented Jan 21, 2025

Great example!


<div class=example>
The ''shape()'' function enables shapes that are responsive, rather than scalable.
While the ''polygon()'' shape is also responsive, it doesn't support curves.
Copy link
Contributor

@yisibl yisibl Jan 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great example!

it doesn't support curves.

polygon adds the round keyword, which I think may not be accurately described here.
https://drafts.csswg.org/css-shapes-1/#funcdef-basic-shape-polygon

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, I'll update!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants