Biani and Frank
/* HTML:
Your text content
*/
.ribbon {
font-size: 28px;
font-weight: bold;
color: #fff;
}
.ribbon {
–s: 1.8em; /* the ribbon size */
–d: .5em; /* the depth */
–c: .8em; /* the cutout part */
padding: var(–d) calc(var(–s) var(–d) .5em) 0;
line-height: 1.8;
background:
linear-gradient(90deg,#0004 var(–d),#0000 0 calc(100% – var(–d)),#0004 0)
50%/calc(100% – 2*var(–s)) 100% no-repeat;
clip-path: polygon(0 0,var(–s) 0,calc(var(–s) var(–d)) var(–d),calc(100% – var(–s) – var(–d)) var(–d),calc(100% – var(–s)) 0,100% 0,calc(100% – var(–c)) calc(50% – var(–d)/2),100% calc(100% – var(–d)),calc(100% – var(–s)) calc(100% – var(–d)),calc(100% – var(–s) – var(–d)) 100%,calc(var(–s) var(–d)) 100%,var(–s) calc(100% – var(–d)),0 calc(100% – var(–d)),var(–c) calc(50% – var(–d)/2));
background-color: #d81a14; /* the main color */
width: fit-content;
}