@mantine/styles
Advanced tools
Comparing version 6.0.2 to 6.0.3
@@ -13,5 +13,5 @@ 'use strict'; | ||
function assignSizeVariables(variables, sizes, name) { | ||
function assignSizeVariables(variables, sizes, name, targetUnitConverter = rem.rem) { | ||
Object.keys(sizes).forEach((size) => { | ||
variables[`--mantine-${name}-${size}`] = rem.rem(sizes[size]); | ||
variables[`--mantine-${name}-${size}`] = targetUnitConverter(sizes[size]); | ||
}); | ||
@@ -34,2 +34,3 @@ } | ||
assignSizeVariables(variables, theme.spacing, "spacing"); | ||
assignSizeVariables(variables, theme.breakpoints, "breakpoints", rem.em); | ||
Object.keys(theme.colors).forEach((color) => { | ||
@@ -36,0 +37,0 @@ theme.colors[color].forEach((shade, index) => { |
import React from 'react'; | ||
import { Global } from '@emotion/react'; | ||
import { rem } from './utils/rem/rem.js'; | ||
import { rem, em } from './utils/rem/rem.js'; | ||
function assignSizeVariables(variables, sizes, name) { | ||
function assignSizeVariables(variables, sizes, name, targetUnitConverter = rem) { | ||
Object.keys(sizes).forEach((size) => { | ||
variables[`--mantine-${name}-${size}`] = rem(sizes[size]); | ||
variables[`--mantine-${name}-${size}`] = targetUnitConverter(sizes[size]); | ||
}); | ||
@@ -25,2 +25,3 @@ } | ||
assignSizeVariables(variables, theme.spacing, "spacing"); | ||
assignSizeVariables(variables, theme.breakpoints, "breakpoints", em); | ||
Object.keys(theme.colors).forEach((color) => { | ||
@@ -27,0 +28,0 @@ theme.colors[color].forEach((shade, index) => { |
{ | ||
"name": "@mantine/styles", | ||
"description": "Mantine css-in-js styles engine, based on emotion", | ||
"version": "6.0.2", | ||
"version": "6.0.3", | ||
"main": "cjs/index.js", | ||
@@ -6,0 +6,0 @@ "module": "esm/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
366536
3509