@use "sass:meta" @use "variables" as var @use "function/font" as f $findFont-Main : null !default $findFont-Code : null !default $fontExt-Main : null !default $fontExt-Code : null !default $typeMain : meta.type-of($fontExt-Main) $typeCode : meta.type-of($fontExt-Code) @if ($typeMain == 'string') or ($typeMain == 'list') @if ($findFont-Main == null) // prepend var.$font : f.font-prepend(var.$font, $fontExt-Main) @else // append $iFoundFont-Main : index(var.$font , $findFont-Main) @if $iFoundFont-Main var.$font : f.font-append( var.$font, $fontExt-Main, $findFont-Main) @else @debug "⚠ Failed to find font '#{$findFont-Main}' in the list of '#{var.$font}'" @if ($typeMain == 'string') or ($typeMain == 'list') @if ($findFont-Code == null) // prepend var.$font-mono : f.font-prepend(var.$font-mono, $fontExt-Code) @else // append $iFoundFont-Code : index(var.$font-mono , $findFont-Code) @if $iFoundFont-Code var.$font-mono : f.font-append( var.$font-mono, $fontExt-Code, $findFont-Code) @else @debug "⚠ Failed to find font '#{$findFont-Code}' in the list of '#{var.$font-mono}'" @mixin font-root #{--ff}: var.$font #{--fm}: var.$font-mono //code