Sass percentage() Function

Last Updated:

Sass percentage() Function

The percentage() function converts a unitless number to a percentage.

Example

SASS TO CSS CONVERTER
//Check your console @debug percentage(0.3); // 30 @debug percentage(100px / 50px); // 200

Syntax

percentage($x)

Parameter Value

ValueTypeExplanation
$x Required A unitless number.

Return Value

ValueExplanation
Number Converts a unitless $x to a percentage.

Share this Page

Meet the Author