In 2025 we get to use the shape CSS function, thank goodness. So, cutting out a shape (such as a fancy gradient glow around another object) is much easier, even if it still looks a bit intimidating at first.
The shape I specified in the code below is actually two shapes: a rectangle 50px larger than its parent and a rectangle the same size as its parent with manually rounded corners using the curve command, and the second shape is "cut out" while the first shape is what is allowed to show, thanks to the evenodd fill rule.
.thing-you-want-to-have-a-sweet-glow::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(45deg, rgba(255, 0, 0, 1), rgba(0, 0, 255, 1));
--br: 10px; /* Border Radius */
--dbr: 20px; /* double the Border Radius */
border-radius: var(--br);
filter: blur(var(--br));
clip-path: shape(evenodd from -50px -50px, line to calc(100% + 50px) -50px, line to calc(100% + 50px) calc(100% + 50px), line to -50px calc(100% + 50px), close, line to var(--dbr) 0, line to calc(100% - var(--dbr)) 0, curve to 100% var(--dbr) with 100% 0, line to 100% calc(100% - var(--dbr)), curve to calc(100% - var(--dbr)) 100% with 100% 100%, line to var(--dbr) 100%, curve to 0 calc(100% - var(--dbr)) with 0 100%, line to 0 var(--dbr), curve to var(--dbr) 0 with 0 0);
}
polygonsupports curves. - sarasoueidan.com/blog/css-svg-clippingclip-pathsupports only basic shapes (like polygon, circle). It does not support a combination of shapes or paths and you would have to use SVG (inline or external) for that.inset():clip-path: inset(0 0 0 0 round 10%);