Ben
Ben

Reputation: 5361

How to combine multiple SASS functions

Is it possible to combine multiple sass functions?

For example i'd like to use saturate and darken

is this possible?

eg

color: darken(red, 5%)
color: desaturate(red, 15%)

Upvotes: 0

Views: 60

Answers (2)

Maxime Gélinas
Maxime Gélinas

Reputation: 2330

Yes of course! Just use the following.

color: desaturate(darken(red, 5%), 15%);

Upvotes: 1

Ben
Ben

Reputation: 5361

Realized I could just assign the result of the first color as the argument in the second:

$darkend: darken(red, 5%)
$desaturated: desaturate($darkend, 15%)
color: $desaturated

Upvotes: 0

Related Questions