Last active
October 11, 2021 11:39
-
-
Save wingleung/b0605296286ef18a6cd91c06177d3379 to your computer and use it in GitHub Desktop.
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
@mixin neumorphism($background) { | |
$highlight: lighten($background, 4%); | |
$lowlight: darken($background, 4%); | |
$shadowhigh: lighten($background, 9%); | |
$shadowlow: darken($background, 9%); | |
background: linear-gradient(145deg, $highlight, $lowlight); | |
box-shadow: 2em 2em 4em $shadowlow, -2em -2em 4em $shadowhigh; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Demo: https://codesandbox.io/s/neumorphism-sass-mixin-kzc1o