implement animated gradient border cards with @property#11399
Conversation
✅ Submission Validation Passed!Great job! All required files are present. 📁 Folder:
|
|
🎉 Pull Request Integrated! Thank you for your contribution, @scriptedbyshivam! Your changes have been successfully merged into 🎮 Join our Discord Server! |
🎉 Congratulations on your PR merge, @scriptedbyshivam! 🚀Thank you so much for your valuable contribution to EaseMotion CSS! Your code is now merged into the main branch. 🎮 Join our Discord Server! ⭐ If you haven't already, please consider giving this repository a Star! It helps show your support, increases project visibility, and helps us grow the community. ✨ Thank you again, and happy coding! 💻 |
📌 Description
This PR introduces a stunning animated gradient border card component built entirely with modern CSS. It leverages the cutting-edge @Property rule to animate conic-gradient angles — a technique previously impossible without JavaScript — creating the mesmerizing rotating border effect seen on premium websites like Linear, Vercel, and Stripe.
The component is production-ready, fully accessible, and includes four distinct color variants for flexible use cases.
🔄 Type of Change
✨ New feature (non-breaking change which adds functionality)
🐛 Bug fix
📝 Documentation update (README.md added)
♻️ Refactoring
🎨 Style/UI update
🚀 Key Changes
Implemented rotating conic-gradient using CSS @Property rule
Smooth 360° rotation at 3s interval with linear timing
Border only appears on hover for a clean default state
Used -webkit-mask-composite: xor to create a hollow gradient ring
Ensures only the border shows, not the fill
Works across all modern browsers
.card--purple (purple → pink gradient)
.card--green (green → cyan gradient)
.card--orange (orange → red gradient)
Default blue variant (indigo → purple → pink)
Card lifts up 8px on hover (translateY)
Icon scales and rotates slightly on hover
"Learn more" link slides right on hover
All transitions use cubic-bezier(0.4, 0, 0.2, 1) for premium feel
Added @media (prefers-reduced-motion: reduce) support
Gradient border stays visible (static) for reduced-motion users
:focus-within outline for keyboard navigation
Semantic HTML with proper heading hierarchy
CSS Grid with auto-fit and minmax(280px, 1fr)
Single column on mobile, multi-column on desktop
Fluid typography using clamp() for headings
Closes #11398