lundi 1 février 2021

How to disable or ignore code if input is null in scss

I have code in my _dip.scss file like that :

#g-dip {
    @if $dip-background-style == 'bg-color' {
        background: $dip-bg-color;
    }
}

it's make background color with selected color from color input field if color option enabled. If no color selected from color input field in color mode, then it's make css code like that :

background: false;

How to disable

background: $dip-bg-color;

code if color mode enabled but no color selected from color input field?

Aucun commentaire:

Enregistrer un commentaire