<commit_before>/// Computes a top-shadow for a card effect.
/// @param {Number} $depth - depth level
/// @return {List}
@function top-shadow($depth, $color: black) {
    $primary-offset: nth(1.5 3 10 14 19, $depth) * 1px;
    $blur: nth(1.5 3 10 14 19, $depth) * 4px;
    $color: rgba($color, nth(.12 .16 .19 .25 .30, $depth));

    @return 0 $primary-offset $blur $color;
}

/// Computes a bottom-shadow for a card effect.
/// @param {Number} $depth - depth level
/// @return {List}
@function bottom-shadow($depth, $color: black) {
    $primary-offset: nth(1.5 3 6 10 15, $depth) * 1px;
    $blur: nth(1 3 3 5 6, $depth) * 4px;
    $color: rgba($color, nth(.24 .23 .23 .22 .22, $depth));

    @return 0 $primary-offset $blur $color;
}

/// Computes a depth shadow
/// @param {Number} $depth - depth level
/// @return {List}
@function depth-shadow($depth, $color: black) {
    $spread: nth(1 2 4 8 12, $depth) * 1px;
    $blur: nth(1 3 3 5 6, $depth) * 4px;
    $color: rgba($color, nth(.24 .23 .23 .22 .22, $depth));

    @return 0 0 $blur $spread $color;
}

/// Gives a depth effect.
/// @param {Number} $depth - depth level (between 1 and 5)
@mixin z-depth($depth, $important: false, $color: black) {
    @if $depth < 1 {
        box-shadow: none if($important, !important);
    } @else if $depth > 5 {
        @warn "Invalid $depth `#{$depth}`.";
    } @else {
        box-shadow: bottom-shadow($depth, $color: $color), top-shadow($depth, $color) if($important, !important);
    }
}
<commit_msg>Style: Sass if function is ternary. Fix #202<commit_after>/// Computes a top-shadow for a card effect.
/// @param {Number} $depth - depth level
/// @return {List}
@function top-shadow($depth, $color: black) {
    $primary-offset: nth(1.5 3 10 14 19, $depth) * 1px;
    $blur: nth(1.5 3 10 14 19, $depth) * 4px;
    $color: rgba($color, nth(.12 .16 .19 .25 .30, $depth));

    @return 0 $primary-offset $blur $color;
}

/// Computes a bottom-shadow for a card effect.
/// @param {Number} $depth - depth level
/// @return {List}
@function bottom-shadow($depth, $color: black) {
    $primary-offset: nth(1.5 3 6 10 15, $depth) * 1px;
    $blur: nth(1 3 3 5 6, $depth) * 4px;
    $color: rgba($color, nth(.24 .23 .23 .22 .22, $depth));

    @return 0 $primary-offset $blur $color;
}

/// Computes a depth shadow
/// @param {Number} $depth - depth level
/// @return {List}
@function depth-shadow($depth, $color: black) {
    $spread: nth(1 2 4 8 12, $depth) * 1px;
    $blur: nth(1 3 3 5 6, $depth) * 4px;
    $color: rgba($color, nth(.24 .23 .23 .22 .22, $depth));

    @return 0 0 $blur $spread $color;
}

/// Gives a depth effect.
/// @param {Number} $depth - depth level (between 1 and 5)
@mixin z-depth($depth, $important: false, $color: black) {
    @if $depth < 1 {
        box-shadow: none if($important, !important, null);
    } @else if $depth > 5 {
        @warn "Invalid $depth `#{$depth}`.";
    } @else {
        box-shadow: bottom-shadow($depth, $color: $color), top-shadow($depth, $color) if($important, !important, null);
    }
}

{'fraction_non_alphanumeric': 0.1917132522196646, 'fraction_numerical': 0.057546859585662614, 'mean_word_length': 2.8850574712643677, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1791662', 'n_tokens_mistral': 1272, 'n_tokens_neox': 1104, 'n_words': 375}