Mister Told That Mister Told That - 4 months ago 55
Sass (Sass) Question

SASS percentage

Hello SOF guys and girls :)

Is there is any chance to get the result of this mathematical example, using Sass (I mean the final result in output.css file):

1000 - 20% = 800

For example, if I trying something like this:

$people: 1000
$dumb_by_trump: percentage(0.2)
$total_adequate: $people - $dumb_by_trump

us poll
hello_world: $total_adequate

Then I'll see in my output.css file the result as:

us poll {
hello_world: 980%; }

But we need to see "800" as a result. Is it possible? Thanks.


Multiply percentage by your constant value

$people: 1000
$dumb_by_trump: percentage(0.2)
$total_adequate: $people - $people*($dumb_by_trump/100%)

us pool
    hello_world: $total_adequate


us pool {
  hello_world: 800;