Created
August 20, 2025 07:44
-
-
Save gursuj/4e7f2fd863e47315a8a850df02298cfe to your computer and use it in GitHub Desktop.
This should be used on elements w/ black backgrounds like in distinctstudios.com.np
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
| selector { | |
| --blur-width: 50px; | |
| position: relative; | |
| /* blur edges */ | |
| &:before, | |
| &:after { | |
| content: ""; | |
| position: absolute; | |
| z-index: 10; | |
| width: var(--blur-width); | |
| top: 0; | |
| height: 100%; | |
| pointer-events: none; | |
| } | |
| &:before { | |
| left: 0; | |
| background: linear-gradient(to right, rgba(0, 0, 0, 1) 20%, rgba(0, 0, 0, 0)); | |
| } | |
| &:after { | |
| right: 0; | |
| background: linear-gradient(to left, rgba(0, 0, 0, 1) 20%, rgba(0, 0, 0, 0)); | |
| } | |
| } | |
| @media (max-width:767px) { | |
| selector { --blur-width: 25px; } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment