CSS Portal

CSS corner-top-shape Property

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!

Description

The corner-top-shape property controls the visual geometry of an element's top corners (both the top-left and top-right), allowing authors to move beyond simple rounded corners to create beveled, notched, asymmetrical, or otherwise sculpted top edges. It is intended as a painting-time property that changes how the element is drawn - not its flow layout - so the element's sizing and document flow remain governed by its box model while its top corners are rendered according to the specified shape. Designers can use it to give cards, headers, or hero panels distinct silhouettes that read as intentional parts of the interface rather than separate decorative images.

When applied, corner-top-shape participates in the element’s clipping and compositing pipeline: backgrounds, borders, and box shadows are painted constrained by the new top-corner contour. For complex visual treatments you can combine it with other shaping and masking features - for example as a complement or fallback to border-radius, or alongside a precise geometric clip created with clip-path, and it can be used in tandem with bitmap or vector masks such as those provided via mask-image. Unlike layout changes, these interactions are primarily about what pixels are visible and how they composite; authors should be deliberate about stacking order and background painting so the intended silhouette reads correctly at different sizes.

Practical considerations include hit-testing and visual affordances: because corner-top-shape alters the visible edge but not necessarily the element’s layout rectangle, authors must account for pointer target expectations and focus indicators so interactive elements remain discoverable and usable. When animating the top-corner shape, expect the browser to treat the property as a paint-time change that can be GPU-accelerated in many implementations, but extremely complex or frequently-updated masks can carry a rendering cost - so prefer simpler shapes or limit animation scope for smoother performance. Finally, provide sensible fallbacks (for example, a simpler rounded top using border-radius or a plain rectangular top) so the component remains legible and functional when the specific shaping capability is not available.

Definition

Initial value
see individual properties
Applies to
see individual properties
Inherited
no
Computed value
see individual properties
Animatable
see individual properties
JavaScript syntax
object.style.cornerTopShape

Syntax

corner-top-shape: <corner-shape>{1,2}

Values

The property accepts one or two <corner-shape-value> values. These define the style of the corner shape:

Keyword Values
  • round - The default value. Creates a standard rounded corner (equivalent to traditional border-radius).
  • scoop - Creates an inward-facing curve (concave), making the corner look "bitten" out.
  • bevel - Creates a flat, diagonal cut across the corner (chamfered look).
  • notch - Creates a rectangular step-like cutout at the corner.
  • square - Straight angle corner (no rounding)
  • squircle - Intermediate shape between round and square
Functional Value
  • superellipse(<number>) - Determines corner curvature using a superellipse curve.

    • Larger positive numbers → closer to a square
    • Values around 1 → default/round
    • Negative values → inverted/concave shapes
    • infinity and -infinity are allowed as extremes ([MDN Web Docs][1])
Global CSS Values
  • inherit
  • initial
  • revert
  • revert-layer
  • unset

Example

<div class="example">
<div class="card top-left">
<h2>Top-left corner</h2>
<p>Using --corner-top-shape for a diagonal notch.</p>
</div>

<div class="card top-right">
<h2>Top-right corner</h2>
<p>Using --corner-top-shape for a diagonal notch on the right.</p>
</div>
</div>
body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    background: #f5f7fa;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
}

.example {
    display: flex;
    gap: 24px;
}

.card {
    width: 280px;
    padding: 20px;
    background: linear-gradient(135deg, #6dd3ff 0%, #7a8cff 100%);
    color: #fff;
    border-radius: 40px;
    box-shadow: 0 8px 20px rgba(36, 47, 74, 0.18);
    transition: transform 200ms ease, box-shadow 200ms ease;
    corner-top-shape: bevel;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 36px rgba(36, 47, 74, 0.22);
}

.card h2 {
    margin: 0 0 8px 0;
    font-size: 18px;
}

.card p {
    margin: 0;
    opacity: 0.95;
}

Browser Support

The following information will show you the current browser support for the CSS corner-top-shape property. Hover over a browser icon to see the version that first introduced support for this CSS property.

This property is supported in some modern browsers, but not all.
Desktop
Chrome
Edge
Firefox
Opera
Safari
Tablets & Mobile
Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-

Last updated by CSSPortal on: 1st January 2026

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!