E-Girl Aesthetic | Rounded Corners | Pastel Vibes ✨
This card now has properly rendered gradient borders with rounded corners! The previous version used border-image which doesn't work with border-radius.
Solution: Using a pseudo-element (::before) with gradient background and mask-composite to create the border effect while preserving rounded corners.
The gradient flows smoothly around all corners! 🌈
Problem: border-image and border-radius don't work together
Solution: Pseudo-element with gradient + mask-composite
/* Gradient border with rounded corners */
.card-kawaii {
position: relative;
background: rgba(255, 255, 255, 0.92);
border-radius: var(--radius-xl);
color: #2d1435;
padding: 2rem;
}
.card-kawaii::before {
content: '';
position: absolute;
inset: 0;
border-radius: var(--radius-xl);
padding: var(--border-width-thick);
background: var(--kawaii-gradient);
-webkit-mask: linear-gradient(#fff 0 0) content-box,
linear-gradient(#fff 0 0);
-webkit-mask-composite: xor;
mask-composite: exclude;
pointer-events: none;
}
Excellent: Chrome, Edge, Safari, Firefox
Fallback: Older browsers show solid border
Note: Uses -webkit-mask for compatibility
::before to create gradient border layerexclude cuts out the center, leaving only the bordernone so clicks pass through to contenttop: 0; right: 0; bottom: 0; left: 0#FF69B4
#E6B3FF
#B0FFE8
#00FFFF
#FF10F0
#FFE66D