A step-by-step walkthrough of creating folded corner effects using the CSS `corner-shape` property with `bevel` values, CSS variables, and pseudo-elements. The technique uses `border-top-right-radius` with `corner-top-right-shape: bevel` to cut the corner, then positions a `::before` pseudo-element to simulate the flip side with a box-shadow. Container style queries with range syntax handle realistic crease angles based on x/y coordinate ratios. The post also compares this approach to Kitty Giraudel's `clip-path` method, noting that `corner-shape` is cleaner but currently only supported in Chrome.

7m read timeFrom css-tricks.com
Post cover image
Table of contents
Step 1: Set some CSS variablesStep 2: Establishing the foldStep 3: Creating the flip sideStep 4: Positioning the flip side ( ::before )Step 5: Sculpting the flip sideFolded corners using clip-path vs. corner-shape

Sort: