tailwindcss 0.0.0-insiders.86e73b2 → 0.0.0-insiders.8776db7

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,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
 
10
10
  ### Fixed
11
11
 
12
+ - Reduce specificity of `abbr` rule in preflight ([#6671](https://github.com/tailwindlabs/tailwindcss/pull/6671))
13
+ - Support HSL with hue units in arbitrary values ([#6726](https://github.com/tailwindlabs/tailwindcss/pull/6726))
14
+
15
+ ## [3.0.7] - 2021-12-17
16
+
17
+ ### Fixed
18
+
12
19
  - Don't mutate custom color palette when overriding per-plugin colors ([#6546](https://github.com/tailwindlabs/tailwindcss/pull/6546))
13
20
  - Improve circular dependency detection when using `@apply` ([#6588](https://github.com/tailwindlabs/tailwindcss/pull/6588))
14
21
  - Only generate variants for non-`user` layers ([#6589](https://github.com/tailwindlabs/tailwindcss/pull/6589))
@@ -1737,8 +1744,9 @@ No release notes
1737
1744
 
1738
1745
  - Everything!
1739
1746
 
1740
- [unreleased]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.6...HEAD
1741
- [3.0.6]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.6...v3.0.6
1747
+ [unreleased]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.7...HEAD
1748
+ [3.0.7]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.6...v3.0.7
1749
+ [3.0.6]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.5...v3.0.6
1742
1750
  [3.0.5]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.4...v3.0.5
1743
1751
  [3.0.4]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.3...v3.0.4
1744
1752
  [3.0.3]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.2...v3.0.3
package/README.md CHANGED
@@ -1,10 +1,14 @@
1
1
  <p>
2
- <a href="https://tailwindcss.com/" target="_blank">
3
- <img alt="Tailwind CSS" width="350" src="https://refactoringui.nyc3.cdn.digitaloceanspaces.com/tailwind-logo-sticker.svg">
4
- </a><br>
5
- A utility-first CSS framework for rapidly building custom user interfaces.
2
+ <a href="https://tailwindcss.com/#gh-light-mode-only" target="_blank">
3
+ <img src="./.github/logo-light.svg" alt="Tailwind CSS" width="350" height="70">
4
+ </a>
5
+ <a href="https://tailwindcss.com/#gh-dark-mode-only" target="_blank">
6
+ <img src="./.github/logo-dark.svg" alt="Tailwind CSS" width="350" height="70">
7
+ </a>
6
8
  </p>
7
9
 
10
+ A utility-first CSS framework for rapidly building custom user interfaces.
11
+
8
12
  <p>
9
13
  <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>
10
14
  <a href="https://www.npmjs.com/package/tailwindcss"><img src="https://img.shields.io/npm/dt/tailwindcss.svg" alt="Total Downloads"></a>
@@ -58,7 +58,7 @@ hr {
58
58
  Add the correct text decoration in Chrome, Edge, and Safari.
59
59
  */
60
60
 
61
- abbr[title] {
61
+ abbr:where([title]) {
62
62
  text-decoration: underline dotted;
63
63
  }
64
64
 
@@ -18,7 +18,7 @@ const PATTERNS = [
18
18
  /([^<>"'`\s]*\[[^<>"'`\s]*:'[^"'`\s]*'\])/.source,
19
19
  /([^<>"'`\s]*\[[^<>"'`\s]*:"[^"'`\s]*"\])/.source,
20
20
  /([^<>"'`\s]*\[[^"'`\s]+\][^<>"'`\s]*)/.source,
21
- /([^<>"'`\s]*[^"'`\s:\\])/.source
21
+ /([^<>"'`\s]*[^"'`\s:\\])/.source,
22
22
  ].join('|');
23
23
  const BROAD_MATCH_GLOBAL_REGEXP = new RegExp(PATTERNS, 'g');
24
24
  const INNER_MATCH_GLOBAL_REGEXP = /[^<>"'`\s.(){}[\]#=%$]*[^<>"'`\s.(){}[\]#=%:$]/g;
@@ -31,4 +31,10 @@ function defaultExtractor(content) {
31
31
  ].flat().filter((v)=>v !== undefined
32
32
  );
33
33
  return results;
34
- }
34
+ } // Regular utilities
35
+ // {{modifier}:}*{namespace}{-{suffix}}*{/{opacityModifier}}?
36
+ // Arbitrary values
37
+ // {{modifier}:}*{namespace}-[{arbitraryValue}]{/{opacityModifier}}?
38
+ // arbitraryValue: no whitespace, balanced quotes unless within quotes, balanced brackets unless within quotes
39
+ // Arbitrary properties
40
+ // {{modifier}:}*[{validCssPropertyName}:{arbitraryValue}]
@@ -267,7 +267,7 @@ function processApply(root, context) {
267
267
  // would have replaced this with something that didn't exist and
268
268
  // therefore it removed the selector altogether. In this specific
269
269
  // case it would result in `{}` instead of `.something-unrelated {}`
270
- if (!extractClasses(rule).some((thing)=>thing === applyCandidate
270
+ if (!extractClasses(rule).some((candidate)=>candidate === applyCandidate
271
271
  )) {
272
272
  rule.remove();
273
273
  return;
package/lib/util/color.js CHANGED
@@ -15,7 +15,8 @@ let SHORT_HEX = /^#([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i;
15
15
  let VALUE = `(?:\\d+|\\d*\\.\\d+)%?`;
16
16
  let SEP = `(?:\\s*,\\s*|\\s+)`;
17
17
  let ALPHA_SEP = `\\s*[,/]\\s*`;
18
- let RGB_HSL = new RegExp(`^(rgb|hsl)a?\\(\\s*(${VALUE})${SEP}(${VALUE})${SEP}(${VALUE})(?:${ALPHA_SEP}(${VALUE}))?\\s*\\)$`);
18
+ let RGB = new RegExp(`^rgba?\\(\\s*(${VALUE})${SEP}(${VALUE})${SEP}(${VALUE})(?:${ALPHA_SEP}(${VALUE}))?\\s*\\)$`);
19
+ let HSL = new RegExp(`^hsla?\\(\\s*((?:${VALUE})(?:deg|rad|grad|turn)?)${SEP}(${VALUE})${SEP}(${VALUE})(?:${ALPHA_SEP}(${VALUE}))?\\s*\\)$`);
19
20
  function parseColor(value) {
20
21
  if (typeof value !== 'string') {
21
22
  return null;
@@ -62,18 +63,32 @@ function parseColor(value) {
62
63
  alpha: hex[4] ? (parseInt(hex[4], 16) / 255).toString() : undefined
63
64
  };
64
65
  }
65
- let match = value.match(RGB_HSL);
66
- if (match !== null) {
66
+ let rgbMatch = value.match(RGB);
67
+ if (rgbMatch !== null) {
67
68
  var ref, ref1;
68
69
  return {
69
- mode: match[1],
70
+ mode: 'rgb',
71
+ color: [
72
+ rgbMatch[1],
73
+ rgbMatch[2],
74
+ rgbMatch[3]
75
+ ].map((v)=>v.toString()
76
+ ),
77
+ alpha: (ref = rgbMatch[4]) === null || ref === void 0 ? void 0 : (ref1 = ref.toString) === null || ref1 === void 0 ? void 0 : ref1.call(ref)
78
+ };
79
+ }
80
+ let hslMatch = value.match(HSL);
81
+ if (hslMatch !== null) {
82
+ var ref2, ref3;
83
+ return {
84
+ mode: 'hsl',
70
85
  color: [
71
- match[2],
72
- match[3],
73
- match[4]
86
+ hslMatch[1],
87
+ hslMatch[2],
88
+ hslMatch[3]
74
89
  ].map((v)=>v.toString()
75
90
  ),
76
- alpha: (ref = match[5]) === null || ref === void 0 ? void 0 : (ref1 = ref.toString) === null || ref1 === void 0 ? void 0 : ref1.call(ref)
91
+ alpha: (ref2 = hslMatch[4]) === null || ref2 === void 0 ? void 0 : (ref3 = ref2.toString) === null || ref3 === void 0 ? void 0 : ref3.call(ref2)
77
92
  };
78
93
  }
79
94
  return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tailwindcss",
3
- "version": "0.0.0-insiders.86e73b2",
3
+ "version": "0.0.0-insiders.8776db7",
4
4
  "description": "A utility-first CSS framework for rapidly building custom user interfaces.",
5
5
  "license": "MIT",
6
6
  "main": "lib/index.js",
@@ -43,7 +43,7 @@
43
43
  "*.js"
44
44
  ],
45
45
  "devDependencies": {
46
- "@swc/cli": "^0.1.52",
46
+ "@swc/cli": "^0.1.55",
47
47
  "@swc/core": "^1.2.118",
48
48
  "@swc/jest": "^0.2.11",
49
49
  "@swc/register": "^0.1.7",
@@ -56,9 +56,9 @@
56
56
  "eslint-plugin-prettier": "^4.0.0",
57
57
  "jest": "^27.4.3",
58
58
  "jest-diff": "^27.4.2",
59
- "postcss": "^8.4.4",
59
+ "postcss": "^8.4.5",
60
60
  "postcss-cli": "^8.3.1",
61
- "prettier": "^2.5.0",
61
+ "prettier": "^2.5.1",
62
62
  "rimraf": "^3.0.0"
63
63
  },
64
64
  "peerDependencies": {
package/peers/index.js CHANGED
@@ -5406,7 +5406,7 @@ var require_processor = __commonJS({
5406
5406
  var Root = require_root();
5407
5407
  var Processor = class {
5408
5408
  constructor(plugins = []) {
5409
- this.version = "8.4.4";
5409
+ this.version = "8.4.5";
5410
5410
  this.plugins = this.normalize(plugins);
5411
5411
  }
5412
5412
  use(plugin) {
@@ -58,7 +58,7 @@ hr {
58
58
  Add the correct text decoration in Chrome, Edge, and Safari.
59
59
  */
60
60
 
61
- abbr[title] {
61
+ abbr:where([title]) {
62
62
  text-decoration: underline dotted;
63
63
  }
64
64
 
@@ -14,6 +14,11 @@ const PATTERNS = [
14
14
  /([^<>"'`\s]*\[[^<>"'`\s]*:"[^"'`\s]*"\])/.source, // `[content:"hello"]` but not `[content:'hello']`
15
15
  /([^<>"'`\s]*\[[^"'`\s]+\][^<>"'`\s]*)/.source, // `fill-[#bada55]`, `fill-[#bada55]/50`
16
16
  /([^<>"'`\s]*[^"'`\s:\\])/.source, // `px-1.5`, `uppercase` but not `uppercase:`
17
+
18
+ // Arbitrary properties
19
+ // /([^"\s]*\[[^\s]+?\][^"\s]*)/.source,
20
+ // /([^'\s]*\[[^\s]+?\][^'\s]*)/.source,
21
+ // /([^`\s]*\[[^\s]+?\][^`\s]*)/.source,
17
22
  ].join('|')
18
23
 
19
24
  const BROAD_MATCH_GLOBAL_REGEXP = new RegExp(PATTERNS, 'g')
@@ -29,3 +34,13 @@ export function defaultExtractor(content) {
29
34
 
30
35
  return results
31
36
  }
37
+
38
+ // Regular utilities
39
+ // {{modifier}:}*{namespace}{-{suffix}}*{/{opacityModifier}}?
40
+
41
+ // Arbitrary values
42
+ // {{modifier}:}*{namespace}-[{arbitraryValue}]{/{opacityModifier}}?
43
+ // arbitraryValue: no whitespace, balanced quotes unless within quotes, balanced brackets unless within quotes
44
+
45
+ // Arbitrary properties
46
+ // {{modifier}:}*[{validCssPropertyName}:{arbitraryValue}]
@@ -297,7 +297,7 @@ function processApply(root, context) {
297
297
  // would have replaced this with something that didn't exist and
298
298
  // therefore it removed the selector altogether. In this specific
299
299
  // case it would result in `{}` instead of `.something-unrelated {}`
300
- if (!extractClasses(rule).some((thing) => thing === applyCandidate)) {
300
+ if (!extractClasses(rule).some((candidate) => candidate === applyCandidate)) {
301
301
  rule.remove()
302
302
  return
303
303
  }
package/src/util/color.js CHANGED
@@ -5,8 +5,11 @@ let SHORT_HEX = /^#([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i
5
5
  let VALUE = `(?:\\d+|\\d*\\.\\d+)%?`
6
6
  let SEP = `(?:\\s*,\\s*|\\s+)`
7
7
  let ALPHA_SEP = `\\s*[,/]\\s*`
8
- let RGB_HSL = new RegExp(
9
- `^(rgb|hsl)a?\\(\\s*(${VALUE})${SEP}(${VALUE})${SEP}(${VALUE})(?:${ALPHA_SEP}(${VALUE}))?\\s*\\)$`
8
+ let RGB = new RegExp(
9
+ `^rgba?\\(\\s*(${VALUE})${SEP}(${VALUE})${SEP}(${VALUE})(?:${ALPHA_SEP}(${VALUE}))?\\s*\\)$`
10
+ )
11
+ let HSL = new RegExp(
12
+ `^hsla?\\(\\s*((?:${VALUE})(?:deg|rad|grad|turn)?)${SEP}(${VALUE})${SEP}(${VALUE})(?:${ALPHA_SEP}(${VALUE}))?\\s*\\)$`
10
13
  )
11
14
 
12
15
  export function parseColor(value) {
@@ -37,13 +40,23 @@ export function parseColor(value) {
37
40
  }
38
41
  }
39
42
 
40
- let match = value.match(RGB_HSL)
43
+ let rgbMatch = value.match(RGB)
44
+
45
+ if (rgbMatch !== null) {
46
+ return {
47
+ mode: 'rgb',
48
+ color: [rgbMatch[1], rgbMatch[2], rgbMatch[3]].map((v) => v.toString()),
49
+ alpha: rgbMatch[4]?.toString?.(),
50
+ }
51
+ }
52
+
53
+ let hslMatch = value.match(HSL)
41
54
 
42
- if (match !== null) {
55
+ if (hslMatch !== null) {
43
56
  return {
44
- mode: match[1],
45
- color: [match[2], match[3], match[4]].map((v) => v.toString()),
46
- alpha: match[5]?.toString?.(),
57
+ mode: 'hsl',
58
+ color: [hslMatch[1], hslMatch[2], hslMatch[3]].map((v) => v.toString()),
59
+ alpha: hslMatch[4]?.toString?.(),
47
60
  }
48
61
  }
49
62