From 7408d8cb5bbd1cbc4cd8ee5e2192505d1a9c69ac Mon Sep 17 00:00:00 2001 From: Volpeon Date: Wed, 21 Jan 2026 11:26:46 +0100 Subject: Fix SASS deprecation warning for if() --- src/_apca.scss | 12 ++++++------ src/_functions.scss | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/_apca.scss b/src/_apca.scss index c5da4a0..5baff02 100644 --- a/src/_apca.scss +++ b/src/_apca.scss @@ -90,8 +90,8 @@ $SA98G: ( $knownExp: 0; $unknownExp: 0; - $scale: map.get($SA98G, if($contrast > 0, scaleBoW, scaleWoB)); - $offset: map.get($SA98G, if($contrast > 0, loBoWoffset, loWoBoffset)); + $scale: map.get($SA98G, if(sass($contrast > 0): scaleBoW; else: scaleWoB)); + $offset: map.get($SA98G, if(sass($contrast > 0): loBoWoffset; else: loWoBoffset)); $contrast: math.div($contrast * .01 + $offset, $scale); @@ -100,12 +100,12 @@ $SA98G: ( } @if $knownType == 'bg' { - $knownExp: map.get($SA98G, if($contrast > 0, normBG, revBG)); - $unknownExp: map.get($SA98G, if($contrast > 0, normTXT, revTXT)); + $knownExp: map.get($SA98G, if(sass($contrast > 0): normBG; else: revBG)); + $unknownExp: map.get($SA98G, if(sass($contrast > 0): normTXT; else: revTXT)); $unknownY: math.pow(math.pow($knownY, $knownExp) - $contrast, math.div(1, $unknownExp)); } @else { - $knownExp: map.get($SA98G, if($contrast > 0, normTXT, revTXT)); - $unknownExp: map.get($SA98G, if($contrast > 0, normBG, revBG)); + $knownExp: map.get($SA98G, if(sass($contrast > 0): normTXT; else: revTXT)); + $unknownExp: map.get($SA98G, if(sass($contrast > 0): normBG; else: revBG)); $unknownY: math.pow($contrast + math.pow($knownY, $knownExp), math.div(1, $unknownExp)); } diff --git a/src/_functions.scss b/src/_functions.scss index ec1f9d8..71dae99 100644 --- a/src/_functions.scss +++ b/src/_functions.scss @@ -51,7 +51,7 @@ $contrast-white: apca.contrast($white-y, $y); $palette: map.set($palette, $key, $color); - $palette: map.set($palette, #{$key}-text, if(math.abs($contrast-black) > math.abs($contrast-white), #000, #fff)); + $palette: map.set($palette, #{$key}-text, if(sass(math.abs($contrast-black) > math.abs($contrast-white)): #000; else: #fff)); } @return $palette; -- cgit v1.2.3-70-g09d2