@unocss/preset-wind 0.41.1 → 0.41.2

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/dist/index.cjs CHANGED
@@ -290,7 +290,7 @@ const queryMatcher = /@media \(min-width: (.+)\)/;
290
290
  const container = [
291
291
  [
292
292
  /^__container$/,
293
- (m, { variantHandlers }) => {
293
+ (m, { theme, variantHandlers }) => {
294
294
  let width = "100%";
295
295
  for (const v of variantHandlers) {
296
296
  const query = v.handle?.({}, (x) => x)?.parent;
@@ -300,6 +300,13 @@ const container = [
300
300
  width = match;
301
301
  }
302
302
  }
303
+ if (theme.container?.center) {
304
+ return {
305
+ "max-width": width,
306
+ "margin-left": "auto",
307
+ "margin-right": "auto"
308
+ };
309
+ }
303
310
  return { "max-width": width };
304
311
  },
305
312
  { internal: true }
package/dist/index.mjs CHANGED
@@ -287,7 +287,7 @@ const queryMatcher = /@media \(min-width: (.+)\)/;
287
287
  const container = [
288
288
  [
289
289
  /^__container$/,
290
- (m, { variantHandlers }) => {
290
+ (m, { theme, variantHandlers }) => {
291
291
  let width = "100%";
292
292
  for (const v of variantHandlers) {
293
293
  const query = v.handle?.({}, (x) => x)?.parent;
@@ -297,6 +297,13 @@ const container = [
297
297
  width = match;
298
298
  }
299
299
  }
300
+ if (theme.container?.center) {
301
+ return {
302
+ "max-width": width,
303
+ "margin-left": "auto",
304
+ "margin-right": "auto"
305
+ };
306
+ }
300
307
  return { "max-width": width };
301
308
  },
302
309
  { internal: true }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/preset-wind",
3
- "version": "0.41.1",
3
+ "version": "0.41.2",
4
4
  "description": "Tailwind / Windi CSS compact preset for UnoCSS",
5
5
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",
@@ -35,8 +35,8 @@
35
35
  "*.css"
36
36
  ],
37
37
  "dependencies": {
38
- "@unocss/core": "0.41.1",
39
- "@unocss/preset-mini": "0.41.1"
38
+ "@unocss/core": "0.41.2",
39
+ "@unocss/preset-mini": "0.41.2"
40
40
  },
41
41
  "scripts": {
42
42
  "build": "unbuild",