Skip to content

Instantly share code, notes, and snippets.

@realgoatish
Last active September 14, 2022 23:40
Show Gist options
  • Save realgoatish/aba508bbceeb130d5acd234ddbb4b94c to your computer and use it in GitHub Desktop.
Save realgoatish/aba508bbceeb130d5acd234ddbb4b94c to your computer and use it in GitHub Desktop.
--shadow-color:
var(--h) clamp(0%, var(--s), 50%) 50%;
.shadow-small {
filter:
drop-shadow(0.5px 1px 1px hsl(var(--shadow-color) / 0.7));
}
.shadow-medium {
filter:
drop-shadow(
1px 2px 2px hsl(var(--shadow-color) / 0.333)
)
drop-shadow(
2px 4px 4px hsl(var(--shadow-color) / 0.333)
)
drop-shadow(
3px 6px 6px hsl(var(--shadow-color) / 0.333)
);
}
.shadow-large {
filter:
drop-shadow(
1px 2px 2px hsl(var(--shadow-color) / 0.2)
)
drop-shadow(
2px 4px 4px hsl(var(--shadow-color) / 0.2)
)
drop-shadow(
4px 8px 8px hsl(var(--shadow-color) / 0.2)
)
drop-shadow(
8px 16px 16px hsl(var(--shadow-color) / 0.2)
)
drop-shadow(
16px 32px 32px hsl(var(--shadow-color) / 0.2)
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment