Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_strip-unit.scss « function « scss « src - github.com/thingsym/hugo-theme-techdoc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: dd931856e11a8de3dace7850e348503580cd6e9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
@charset "utf-8";

// Built-In Modules
@use 'sass:meta';
@use 'sass:math';

@function strip-unit($value) {
	@if meta.type-of($value) == 'number' and math.is-unitless($value) == false {
		@return math.div($value, $value * 0 + 1);
	} @else if meta.type-of($value) == 'number' {
		@return $value;
	} @else {
		@warn $value;
		@warn meta.type-of($value);
		@error "error strip unit"
	}
}