Last active
June 20, 2022 07:00
-
-
Save metodribic/25215d7af7a26460ae648f6902c17721 to your computer and use it in GitHub Desktop.
Full bleed box-shadow + clip-path technique
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
.full-bleed-background { | |
--c: red; | |
background: var(--c); | |
/* Stretched box shadow */ | |
box-shadow: 0 0 0 100vmax var(--c); | |
/* Clip only the top and the bottom */ | |
clip-path: inset(0 -100vmax); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment