A Pen by Adam Argyle on CodePen.
Created
April 23, 2025 20:59
-
-
Save knightad10/12eb8b8a900c703c88f1075316604ac2 to your computer and use it in GitHub Desktop.
Rainbow shadow button
This file contains hidden or 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
<button>Explore use cases</button> |
This file contains hidden or 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
button { | |
background: black; | |
color: white; | |
font-size: 1.25rem; | |
padding: 2ch 3ch; | |
text-box: cap alphabetic; | |
border-radius: 1e3px; | |
border: none; | |
position: relative; | |
&::before { | |
--vibrance: 50%; | |
content: " "; | |
position: absolute; | |
inset: 10px 10px -10px; | |
background: linear-gradient(to right in oklch longer hue, oklch(95% var(--vibrance) 0) 0 100%); | |
filter: blur(20px); | |
border-radius: inherit; | |
z-index: -1; | |
} | |
} | |
@layer support { | |
* { | |
box-sizing: border-box; | |
margin: 0; | |
} | |
html { | |
block-size: 100%; | |
color-scheme: light; | |
} | |
body { | |
min-block-size: 100%; | |
font-family: system-ui, sans-serif; | |
display: grid; | |
place-content: center; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment