Skip to content

Instantly share code, notes, and snippets.

@mjn666
Last active December 29, 2015 06:59
Show Gist options
  • Save mjn666/7633280 to your computer and use it in GitHub Desktop.
Save mjn666/7633280 to your computer and use it in GitHub Desktop.
Automated textshadow color based on current font color being used- Courtesy of Woocommerce.
// Automated textshadow based on color being used
@mixin darkorlighttextshadow( $a, $opacity: 0.8 ) {
@if lightness( $a ) >= 65% {
@include text_shadow( 0, -1px, 0, rgba(0, 0, 0, $opacity) );
} @else {
@include text_shadow( 0, 1px, 0, rgba(255, 255, 255, $opacity) );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment