A worked example, rendered from real sample data. Sign in to run the tool on your own input.
color=#ef4444.ribbon { position: relative; }
.ribbon::before {
content: attr(data-ribbon); position: absolute; top: 12px; left: -8px;
padding: 4px 12px 4px 10px; background: #ef4444; color: #fff;
font-size: 12px; font-weight: 700; letter-spacing: 0.5px;
clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 50%, 100% 100%, 0 100%);
}
Build a corner ribbon label using clip-path — content via data-ribbon attr. Part of the DevTools Surf developer suite. Browse more tools in the CSS collection.