strip-units

Description

Removes units from a CSS distance value with units, to return a number.

SCSS Usage

strip-units($number)

Where $number can be a CSS distance value, such as 12px, 10em or 2rem.

And so, in SCSS:

_component.scss
.foo::before {
  content: strip-units(32px);
}

Output

app.css
.foo::before {
  content: 32;
}

Notes

Not an especially common need in SCSS, but useful when dealing with numbers to avoid unexpected - used in rem-calc.