Created
June 22, 2023 14:45
-
-
Save darlanalves/4a7005dc841d1b23c502e4821fdcfbd0 to your computer and use it in GitHub Desktop.
Gradient border color on a box
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.border { | |
position: relative; | |
background-clip: padding-box; | |
border: 1px solid transparent; | |
border-radius: var(--brand-borderRadius-large); | |
} | |
.border::before { | |
content: ""; | |
position: absolute; | |
top: 0; | |
right: 0; | |
bottom: 0; | |
left: 0; | |
z-index: -1; | |
margin: -1px; | |
background: linear-gradient(#89898a, #37393d); | |
border-radius: inherit; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment