Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-shapes-2] Add a detailed example for shape() #11548

Merged
merged 3 commits into from
Jan 21, 2025
Merged

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 smfr and bramus January 21, 2025 10:13
css-shapes-2/Overview.bs Outdated Show resolved Hide resolved
css-shapes-2/Overview.bs Outdated Show resolved Hide resolved
@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