Design comparison
SolutionDesign
Solution retrospective
As the style-guide.md specify, the active input border should be linear gradient, what is the best way to do this?
Community feedback
- @mattari97Posted over 2 years ago
Hi Khánh, congratulations on completing this challenge.
I give you a little snippet to apply a gradient only on the border of an element
The first gradient should match the background of your component and the second is the gradient for the border but it is actually the background of the component clipping throught the transparent border.
.border-gradient { background: linear-gradient(to top left,#fff,#ffd) padding-box linear-gradient(to top left,blue,red) border-box; border-color: transparent; }
I hope it helps you.
Have a good day/night. Peace ✌️
Marked as helpful1
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord