Ionic 4 set style color by a variable


How can i call a Attribute in style with scss?

Thank You

Hello @DargEdge

I think you need to create a variable sColor in your page.
And set this variable like this:

this.sColor = "#cededc";

Then use this variable in your file like that:

<ion-item-sliding ngStyle="{'border-color': sColor}">

But … for me the best way is change the class with a toogle function.