tailwindcss 3.1.7 → 3.1.8

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/CHANGELOG.md CHANGED
@@ -9,6 +9,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
 
10
10
  - Nothing yet!
11
11
 
12
+ ## [3.1.8] - 2022-08-05
13
+
14
+ ### Fixed
15
+
16
+ - Don’t prefix classes within reused arbitrary variants ([#8992](https://github.com/tailwindlabs/tailwindcss/pull/8992))
17
+ - Fix usage of alpha values inside single-named colors that are functions ([#9008](https://github.com/tailwindlabs/tailwindcss/pull/9008))
18
+ - Fix `@apply` of user utilities when negative and non-negative versions both exist ([#9027](https://github.com/tailwindlabs/tailwindcss/pull/9027))
19
+
12
20
  ## [3.1.7] - 2022-07-29
13
21
 
14
22
  ### Fixed
@@ -2021,7 +2029,8 @@ No release notes
2021
2029
 
2022
2030
  - Everything!
2023
2031
 
2024
- [unreleased]: https://github.com/tailwindlabs/tailwindcss/compare/v3.1.7...HEAD
2032
+ [unreleased]: https://github.com/tailwindlabs/tailwindcss/compare/v3.1.8...HEAD
2033
+ [3.1.8]: https://github.com/tailwindlabs/tailwindcss/compare/v3.1.7...v3.1.8
2025
2034
  [3.1.7]: https://github.com/tailwindlabs/tailwindcss/compare/v3.1.6...v3.1.7
2026
2035
  [3.1.6]: https://github.com/tailwindlabs/tailwindcss/compare/v3.1.5...v3.1.6
2027
2036
  [3.1.5]: https://github.com/tailwindlabs/tailwindcss/compare/v3.1.4...v3.1.5
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- <p>
1
+ <p align="center">
2
2
  <a href="https://tailwindcss.com/#gh-light-mode-only" target="_blank">
3
3
  <img src="./.github/logo-light.svg" alt="Tailwind CSS" width="350" height="70">
4
4
  </a>
@@ -7,9 +7,12 @@
7
7
  </a>
8
8
  </p>
9
9
 
10
- A utility-first CSS framework for rapidly building custom user interfaces.
10
+ <p align="center">
11
+ A utility-first CSS framework for rapidly building custom user interfaces.
12
+ </p>
13
+
11
14
 
12
- <p>
15
+ <p align="center">
13
16
  <a href="https://github.com/tailwindlabs/tailwindcss/actions"><img src="https://img.shields.io/github/workflow/status/tailwindlabs/tailwindcss/Node.js%20CI" alt="Build Status"></a>
14
17
  <a href="https://www.npmjs.com/package/tailwindcss"><img src="https://img.shields.io/npm/dt/tailwindcss.svg" alt="Total Downloads"></a>
15
18
  <a href="https://github.com/tailwindcss/tailwindcss/releases"><img src="https://img.shields.io/npm/v/tailwindcss.svg" alt="Latest Release"></a>
@@ -436,6 +436,11 @@ function processApply(root, context, localCache) {
436
436
  });
437
437
  });
438
438
  }
439
+ // It could be that the node we were inserted was removed because the class didn't match
440
+ // If that was the *only* rule in the parent, then we have nothing add so we skip it
441
+ if (!root1.nodes[0]) {
442
+ continue;
443
+ }
439
444
  // Insert it
440
445
  siblings.push([
441
446
  // Ensure that when we are sorting, that we take the layer order into account
@@ -180,7 +180,6 @@ function applyVariant(variant, matches, context) {
180
180
  return matches;
181
181
  }
182
182
  let args;
183
- let isArbitraryVariant = false;
184
183
  // Find partial arbitrary variants
185
184
  if (variant.endsWith("]") && !variant.startsWith("[")) {
186
185
  args = variant.slice(variant.lastIndexOf("[") + 1, -1);
@@ -192,7 +191,6 @@ function applyVariant(variant, matches, context) {
192
191
  if (!(0, _setupContextUtils.isValidVariantFormatString)(selector)) {
193
192
  return [];
194
193
  }
195
- isArbitraryVariant = true;
196
194
  let fn = (0, _setupContextUtils.parseVariant)(selector);
197
195
  let sort = Array.from(context.variantOrder.values()).pop() << 1n;
198
196
  context.variantMap.set(variant, [
@@ -341,7 +339,7 @@ function applyVariant(variant, matches, context) {
341
339
  ...meta,
342
340
  sort: variantSort | meta.sort,
343
341
  collectedFormats: ((_collectedFormats = meta.collectedFormats) !== null && _collectedFormats !== void 0 ? _collectedFormats : []).concat(collectedFormats),
344
- isArbitraryVariant
342
+ isArbitraryVariant: isArbitraryValue(variant)
345
343
  },
346
344
  clone.nodes[0],
347
345
  ];
@@ -160,7 +160,7 @@ function resolveFunctionKeys(object) {
160
160
  let val = object;
161
161
  while(val !== undefined && val !== null && index < path.length){
162
162
  val = val[path[index++]];
163
- let shouldResolveAsFn = isFunction(val) && (path.alpha === undefined || index < path.length - 1);
163
+ let shouldResolveAsFn = isFunction(val) && (path.alpha === undefined || index <= path.length - 1);
164
164
  val = shouldResolveAsFn ? val(resolvePath, configUtils) : val;
165
165
  }
166
166
  if (val !== undefined) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tailwindcss",
3
- "version": "3.1.7",
3
+ "version": "3.1.8",
4
4
  "description": "A utility-first CSS framework for rapidly building custom user interfaces.",
5
5
  "license": "MIT",
6
6
  "main": "lib/index.js",
@@ -46,16 +46,16 @@
46
46
  "@swc/core": "^1.2.218",
47
47
  "@swc/jest": "^0.2.22",
48
48
  "@swc/register": "^0.1.10",
49
- "autoprefixer": "^10.4.7",
49
+ "autoprefixer": "^10.4.8",
50
50
  "cssnano": "^5.1.12",
51
51
  "esbuild": "^0.14.48",
52
- "eslint": "^8.19.0",
52
+ "eslint": "^8.20.0",
53
53
  "eslint-config-prettier": "^8.5.0",
54
54
  "eslint-plugin-prettier": "^4.2.1",
55
55
  "jest": "^28.1.3",
56
56
  "jest-diff": "^28.1.3",
57
57
  "prettier": "^2.7.1",
58
- "prettier-plugin-tailwindcss": "^0.1.12",
58
+ "prettier-plugin-tailwindcss": "^0.1.13",
59
59
  "rimraf": "^3.0.0",
60
60
  "source-map-js": "^1.0.2"
61
61
  },