tailwind-preset-mantine 2.0.4 → 2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/package.json +1 -1
- package/src/generate.js +3 -4
- package/src/index.css +1 -2
- package/src/theme.css +1 -1
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ A [Tailwind CSS (v4)](https://tailwindcss.com/) preset for seamless integration
|
|
|
11
11
|
| v4 | v7 | v2 (current) |
|
|
12
12
|
| v3 | v7 | ([v1](https://github.com/songkeys/tailwind-preset-mantine/tree/v1))* |
|
|
13
13
|
|
|
14
|
-
*Note: you can still use v1 for Tailwind CSS via [`@config`](https://tailwindcss.com/docs/upgrade-guide#using-a-javascript-config-file) directive.
|
|
14
|
+
*Note: you can still use v1 for Tailwind CSS V4 via [`@config`](https://tailwindcss.com/docs/upgrade-guide#using-a-javascript-config-file) directive.
|
|
15
15
|
|
|
16
16
|
## Installation
|
|
17
17
|
|
|
@@ -19,13 +19,15 @@ A [Tailwind CSS (v4)](https://tailwindcss.com/) preset for seamless integration
|
|
|
19
19
|
npm install tailwind-preset-mantine
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
+
Refer to [Tailwind Installation](https://tailwindcss.com/docs/installation/) for the rest of requirements to install tailwind depends on your project setup or framework.
|
|
23
|
+
|
|
22
24
|
## Usage
|
|
23
25
|
|
|
24
26
|
### Default mantine theme
|
|
25
27
|
|
|
26
28
|
1. All-in-one import (recommended)
|
|
27
29
|
|
|
28
|
-
|
|
30
|
+
When importing the styles, instead of importing the tailwind css file, importing this preset in the css file:
|
|
29
31
|
|
|
30
32
|
```css
|
|
31
33
|
@import "tailwind-preset-mantine";
|
package/package.json
CHANGED
package/src/generate.js
CHANGED
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
import { DEFAULT_THEME } from "@mantine/core";
|
|
6
6
|
|
|
7
7
|
export function generateDefaultImports() {
|
|
8
|
-
return
|
|
9
|
-
/** This file is autogenerated by the script. Do not edit it manually. */
|
|
8
|
+
return `/** This file is autogenerated by the script. Do not edit it manually. */
|
|
10
9
|
@layer theme, base, mantine, components, utilities;
|
|
11
10
|
@import "tailwindcss/theme.css" layer(theme);
|
|
12
11
|
@import "tailwindcss/preflight.css" layer(base);
|
|
@@ -23,8 +22,7 @@ export function generateTheme(theme = DEFAULT_THEME) {
|
|
|
23
22
|
// check if the object is deeply equal to DEFAULT_THEME
|
|
24
23
|
const isDefault = JSON.stringify(theme) === JSON.stringify(DEFAULT_THEME);
|
|
25
24
|
|
|
26
|
-
return
|
|
27
|
-
/** This file is autogenerated by the script. Do not edit it manually. */
|
|
25
|
+
return `/** This file is autogenerated by the script. Do not edit it manually. */
|
|
28
26
|
${isDefault ? '@custom-variant dark (&:where([data-mantine-color-scheme="dark"], [data-mantine-color-scheme="dark"] *));' : ""}
|
|
29
27
|
|
|
30
28
|
@theme {
|
|
@@ -176,6 +174,7 @@ ${isDefault ? '@custom-variant dark (&:where([data-mantine-color-scheme="dark"],
|
|
|
176
174
|
.join("\n")}
|
|
177
175
|
|
|
178
176
|
/* breakpoints */
|
|
177
|
+
${theme.breakpoints ? "--breakpoint-*: initial;" : ""}
|
|
179
178
|
${Object.entries(theme.breakpoints ?? {})
|
|
180
179
|
.map(([key, value]) =>
|
|
181
180
|
`
|
package/src/index.css
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
/** This file is autogenerated by the script. Do not edit it manually. */
|
|
3
2
|
@layer theme, base, mantine, components, utilities;
|
|
4
3
|
@import "tailwindcss/theme.css" layer(theme);
|
|
@@ -6,7 +5,6 @@
|
|
|
6
5
|
@import "tailwindcss/utilities.css" layer(utilities);
|
|
7
6
|
|
|
8
7
|
@import "@mantine/core/styles.layer.css";
|
|
9
|
-
|
|
10
8
|
/** This file is autogenerated by the script. Do not edit it manually. */
|
|
11
9
|
@custom-variant dark (&:where([data-mantine-color-scheme="dark"], [data-mantine-color-scheme="dark"] *));
|
|
12
10
|
|
|
@@ -404,6 +402,7 @@
|
|
|
404
402
|
--color-orange-outline-hover: var(--mantine-color-orange-outline-hover);
|
|
405
403
|
|
|
406
404
|
/* breakpoints */
|
|
405
|
+
--breakpoint-*: initial;
|
|
407
406
|
|
|
408
407
|
--breakpoint-xs: 36em;
|
|
409
408
|
|
package/src/theme.css
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
/** This file is autogenerated by the script. Do not edit it manually. */
|
|
3
2
|
@custom-variant dark (&:where([data-mantine-color-scheme="dark"], [data-mantine-color-scheme="dark"] *));
|
|
4
3
|
|
|
@@ -396,6 +395,7 @@
|
|
|
396
395
|
--color-orange-outline-hover: var(--mantine-color-orange-outline-hover);
|
|
397
396
|
|
|
398
397
|
/* breakpoints */
|
|
398
|
+
--breakpoint-*: initial;
|
|
399
399
|
|
|
400
400
|
--breakpoint-xs: 36em;
|
|
401
401
|
|