postcss-preset-mantine
Advanced tools
Comparing version 1.14.1 to 1.14.2
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const unitsConverters = require('./converters'); | ||
const rem = unitsConverters.rem; | ||
const rem = unitsConverters.remStrict; | ||
module.exports = () => { | ||
@@ -6,0 +6,0 @@ return { |
@@ -8,3 +8,3 @@ "use strict"; | ||
} | ||
function createConverter(units, { shouldScale = false } = {}) { | ||
function createConverter(units, { shouldScale = false, transformUnitLess = true } = {}) { | ||
function converter(value) { | ||
@@ -38,2 +38,5 @@ if (value === 0 || value === '0') { | ||
const replaced = value.replace('px', ''); | ||
if (replaced === value && !transformUnitLess) { | ||
return value; | ||
} | ||
if (!Number.isNaN(Number(replaced))) { | ||
@@ -49,2 +52,3 @@ const val = `${Number(replaced) / 16}${units}`; | ||
const rem = createConverter('rem', { shouldScale: true }); | ||
const remStrict = createConverter('rem', { shouldScale: true, transformUnitLess: false }); | ||
const remNoScale = createConverter('rem'); | ||
@@ -87,3 +91,4 @@ const em = createConverter('em'); | ||
rem, | ||
remStrict, | ||
remNoScale, | ||
}; |
{ | ||
"name": "postcss-preset-mantine", | ||
"version": "1.14.1", | ||
"version": "1.14.2", | ||
"description": "PostCSS preset for Mantine (7.0+) applications", | ||
@@ -5,0 +5,0 @@ "main": "dist/preset.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35810
531