@sass-collective/strip-unit

Strip unit on CSS value.

Usage no npm install needed!

<script type="module">
  import sassCollectiveStripUnit from 'https://cdn.skypack.dev/@sass-collective/strip-unit';
</script>

README

Sass Strip Unit

Version Downloads License

Introduction

Strip unit on CSS value.

Installing

npm install @sass-collective/strip-unit

Usage

@use "@sass-collective/strip-unit";

API

Sass functions

Function Description
strip($value) Return value without the unit.

Strip unit value with strip-unit.strip()

The following Sass will produce:

@use "@sass-collective/strip-unit";

$value: strip-unit.strip(100px);
// 100