@use '../../functions/is-falsey' as *;

/// Adds a colored text outline to a font.
///
/// @param {Color} $color [hsl(0 0% 39.2%)} - The outline color for the font.
/// @param {Bool | String} $is-important - Mark the effect as important. This
/// should be avoided whenever possible.
///
/// @group Utilities
/// @require {function} is-falsey
@mixin text-outline($color: hsl(0 0% 39.2%), $is-important: false) {
  text-shadow:
    -1px -1px 0 #{$color},
    1px -1px 0 #{$color},
    -1px 1px 0 #{$color},
    1px 1px 0 #{$color} if(is-falsey($is-important), null, !important);
}
