Creating Beveled Corners with “corner-shape”

Creating Beveled Corners with “corner-shape”
TL;DR: To get some of these effects, we need to use this new property in somewhat-unintuitive ways!
Longer Read: The bottom two corners have zero radius, and we also omit the bottom border. We repeat the same trick for the bottom edge with the ::after pseudo-element, but with everything flipped; we omit the top border and apply border-radius exclusively to the bottom corners. We can use ::before and ::after for the top/bottom edges, but right now, they don’t connect to anything.
Read the full story at Joshwcomeau →
Related Skills: Software Design
Wider Reading: roadmap.sh — Software DesignRefactoring Guru — Software DesignCoursera — Software Design

💬 0 comments

No comments yet — be the first to say what you think.