-
Notifications
You must be signed in to change notification settings - Fork 718
[css-borders-4] How to draw triangles using corner-shape
?
#11846
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
Comments
corner-shape
generates trianglescorner-shape
?
The left picture uses different radius constraints for bevel from the ones for round... Those constraints aren't spec'ed yet. The following draws a triangle atm: .bevel {
background: rebeccapurple;
border-radius: 200px 200px 0 0;
width: 400px;
height: 200px;
corner-shape: bevel;
} |
So currently it can only draw |
@yisibl The example code you're using shouldn't be generating that triangle. Radius shrinking should make the bevel cover the same area that the rounded corner does in the "fallback", just cutting in halfway on each side. It looks like the tool just doesn't implement the shrinking properly; you can see it differs from the fallback in exactly the same manner even if set to "curve". You definitely can make it cover the entire height, you just need a different value: |
@tabatkins Sorry, I forgot the parameter after the |
Uh oh!
There was an error while loading. Please reload this page.
In @LeaVerou's tool, the
bevel
value makes it easy to generate a triangle(left), but the current Chrome implementation(right) doesn't work yet - is this a limitation of the current specification or an implementation issue?Drawing triangles with CSS is a very common requirement, most commonly used for popovers for example.
cc @noamr @smfr
The text was updated successfully, but these errors were encountered: