tailwindcss 0.0.0-insiders.e361b3a → 0.0.0-insiders.e5ed08b
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 +26 -14
- package/lib/css/preflight.css +1 -0
- package/lib/lib/collapseAdjacentRules.js +4 -1
- package/lib/lib/generateRules.js +2 -1
- package/lib/postcss-plugins/nesting/README.md +2 -2
- package/lib/util/dataTypes.js +10 -3
- package/package.json +5 -5
- package/peers/index.js +1857 -1154
- package/src/css/preflight.css +1 -0
- package/src/lib/collapseAdjacentRules.js +5 -1
- package/src/lib/generateRules.js +5 -1
- package/src/postcss-plugins/nesting/README.md +2 -2
- package/src/util/dataTypes.js +13 -5
- package/types/config.d.ts +15 -15
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
9
9
|
|
|
10
10
|
### Fixed
|
|
11
11
|
|
|
12
|
+
- Types: allow for arbitrary theme values (for 3rd party plugins) ([#7926](https://github.com/tailwindlabs/tailwindcss/pull/7926))
|
|
13
|
+
- Don’t split vars with numbers in them inside arbitrary values ([#8091](https://github.com/tailwindlabs/tailwindcss/pull/8091))
|
|
14
|
+
- Require matching prefix when detecting negatives ([#8121](https://github.com/tailwindlabs/tailwindcss/pull/8121))
|
|
15
|
+
- Handle duplicate At Rules without children ([#8122](https://github.com/tailwindlabs/tailwindcss/pull/8122))
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- Allow default ring color to be a function ([#7587](https://github.com/tailwindlabs/tailwindcss/pull/7587))
|
|
20
|
+
- Add `rgb` and `hsl` color helpers for CSS variables ([#7665](https://github.com/tailwindlabs/tailwindcss/pull/7665))
|
|
21
|
+
- Support PostCSS `Document` nodes ([#7291](https://github.com/tailwindlabs/tailwindcss/pull/7291))
|
|
22
|
+
- Add `text-start` and `text-end` utilities ([#6656](https://github.com/tailwindlabs/tailwindcss/pull/6656))
|
|
23
|
+
- Support customizing class name when using `darkMode: 'class'` ([#5800](https://github.com/tailwindlabs/tailwindcss/pull/5800))
|
|
24
|
+
- Add `--poll` option to the CLI ([#7725](https://github.com/tailwindlabs/tailwindcss/pull/7725))
|
|
25
|
+
- Add new `border-spacing` utilities ([#7102](https://github.com/tailwindlabs/tailwindcss/pull/7102))
|
|
26
|
+
- Add `enabled` variant ([#7905](https://github.com/tailwindlabs/tailwindcss/pull/7905))
|
|
27
|
+
- Add TypeScript types for the `tailwind.config.js` file ([#7891](https://github.com/tailwindlabs/tailwindcss/pull/7891))
|
|
28
|
+
- Add `backdrop` variant ([#7924](https://github.com/tailwindlabs/tailwindcss/pull/7924))
|
|
29
|
+
|
|
30
|
+
## [3.0.24] - 2022-05-12
|
|
31
|
+
|
|
32
|
+
### Fixed
|
|
33
|
+
|
|
12
34
|
- Prevent nesting plugin from breaking other plugins ([#7563](https://github.com/tailwindlabs/tailwindcss/pull/7563))
|
|
13
35
|
- Recursively collapse adjacent rules ([#7565](https://github.com/tailwindlabs/tailwindcss/pull/7565))
|
|
14
36
|
- Preserve source maps for generated CSS ([#7588](https://github.com/tailwindlabs/tailwindcss/pull/7588))
|
|
@@ -22,6 +44,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
22
44
|
- Fix generation of `div:not(.foo)` if `.foo` is never defined ([#7815](https://github.com/tailwindlabs/tailwindcss/pull/7815))
|
|
23
45
|
- Allow for custom properties in `rgb`, `rgba`, `hsl` and `hsla` colors ([#7933](https://github.com/tailwindlabs/tailwindcss/pull/7933))
|
|
24
46
|
- Remove autoprefixer as explicit peer-dependency to avoid invalid warnings in situations where it isn't actually needed ([#7949](https://github.com/tailwindlabs/tailwindcss/pull/7949))
|
|
47
|
+
- Ensure the `percentage` data type is validated correctly ([#8015](https://github.com/tailwindlabs/tailwindcss/pull/8015))
|
|
48
|
+
- Make sure `font-weight` is inherited by form controls in all browsers ([#8078](https://github.com/tailwindlabs/tailwindcss/pull/8078))
|
|
25
49
|
|
|
26
50
|
### Changed
|
|
27
51
|
|
|
@@ -29,19 +53,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
29
53
|
- Replace `cosmiconfig` with `lilconfig` ([#6039](https://github.com/tailwindlabs/tailwindcss/pull/6038))
|
|
30
54
|
- Update `cssnano` to avoid removing empty variables when minifying ([#7818](https://github.com/tailwindlabs/tailwindcss/pull/7818))
|
|
31
55
|
|
|
32
|
-
### Added
|
|
33
|
-
|
|
34
|
-
- Allow default ring color to be a function ([#7587](https://github.com/tailwindlabs/tailwindcss/pull/7587))
|
|
35
|
-
- Add `rgb` and `hsl` color helpers for CSS variables ([#7665](https://github.com/tailwindlabs/tailwindcss/pull/7665))
|
|
36
|
-
- Support PostCSS `Document` nodes ([#7291](https://github.com/tailwindlabs/tailwindcss/pull/7291))
|
|
37
|
-
- Add `text-start` and `text-end` utilities ([#6656](https://github.com/tailwindlabs/tailwindcss/pull/6656))
|
|
38
|
-
- Support customizing class name when using `darkMode: 'class'` ([#5800](https://github.com/tailwindlabs/tailwindcss/pull/5800))
|
|
39
|
-
- Add `--poll` option to the CLI ([#7725](https://github.com/tailwindlabs/tailwindcss/pull/7725))
|
|
40
|
-
- Add new `border-spacing` utilities ([#7102](https://github.com/tailwindlabs/tailwindcss/pull/7102))
|
|
41
|
-
- Add `enabled` variant ([#7905](https://github.com/tailwindlabs/tailwindcss/pull/7905))
|
|
42
|
-
- Add TypeScript types for the `tailwind.config.js` file ([#7891](https://github.com/tailwindlabs/tailwindcss/pull/7891))
|
|
43
|
-
- Add `backdrop` variant ([#7924](https://github.com/tailwindlabs/tailwindcss/pull/7924))
|
|
44
|
-
|
|
45
56
|
## [3.0.23] - 2022-02-16
|
|
46
57
|
|
|
47
58
|
### Fixed
|
|
@@ -1907,7 +1918,8 @@ No release notes
|
|
|
1907
1918
|
|
|
1908
1919
|
- Everything!
|
|
1909
1920
|
|
|
1910
|
-
[unreleased]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.
|
|
1921
|
+
[unreleased]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.24...HEAD
|
|
1922
|
+
[3.0.24]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.23...v3.0.24
|
|
1911
1923
|
[3.0.23]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.22...v3.0.23
|
|
1912
1924
|
[3.0.22]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.21...v3.0.22
|
|
1913
1925
|
[3.0.21]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.20...v3.0.21
|
package/lib/css/preflight.css
CHANGED
|
@@ -21,7 +21,10 @@ function collapseAdjacentRules() {
|
|
|
21
21
|
currentRule = node;
|
|
22
22
|
} else if (properties.every((property)=>((_property = node[property]) !== null && _property !== void 0 ? _property : "").replace(/\s+/g, " ") === ((_property1 = currentRule[property]) !== null && _property1 !== void 0 ? _property1 : "").replace(/\s+/g, " ")
|
|
23
23
|
)) {
|
|
24
|
-
|
|
24
|
+
// An AtRule may not have children (for example if we encounter duplicate @import url(…) rules)
|
|
25
|
+
if (node.nodes) {
|
|
26
|
+
currentRule.append(node.nodes);
|
|
27
|
+
}
|
|
25
28
|
node.remove();
|
|
26
29
|
} else {
|
|
27
30
|
currentRule = node;
|
package/lib/lib/generateRules.js
CHANGED
|
@@ -390,7 +390,8 @@ function* resolveMatchedPlugins(classCandidate, context) {
|
|
|
390
390
|
let negative = false;
|
|
391
391
|
const twConfigPrefix = context.tailwindConfig.prefix;
|
|
392
392
|
const twConfigPrefixLen = twConfigPrefix.length;
|
|
393
|
-
|
|
393
|
+
const hasMatchingPrefix = candidatePrefix.startsWith(twConfigPrefix) || candidatePrefix.startsWith(`-${twConfigPrefix}`);
|
|
394
|
+
if (candidatePrefix[twConfigPrefixLen] === "-" && hasMatchingPrefix) {
|
|
394
395
|
negative = true;
|
|
395
396
|
candidatePrefix = twConfigPrefix + candidatePrefix.slice(twConfigPrefixLen + 1);
|
|
396
397
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# tailwindcss/nesting
|
|
2
2
|
|
|
3
|
-
This is a PostCSS plugin that wraps [postcss-nested](https://github.com/postcss/postcss-nested) or [postcss-nesting](https://github.com/
|
|
3
|
+
This is a PostCSS plugin that wraps [postcss-nested](https://github.com/postcss/postcss-nested) or [postcss-nesting](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-nesting) and acts as a compatibility layer to make sure your nesting plugin of choice properly understands Tailwind's custom syntax like `@apply` and `@screen`.
|
|
4
4
|
|
|
5
5
|
Add it to your PostCSS configuration, somewhere before Tailwind itself:
|
|
6
6
|
|
|
@@ -18,7 +18,7 @@ module.exports = {
|
|
|
18
18
|
|
|
19
19
|
By default, it uses the [postcss-nested](https://github.com/postcss/postcss-nested) plugin under the hood, which uses a Sass-like syntax and is the plugin that powers nesting support in the [Tailwind CSS plugin API](https://tailwindcss.com/docs/plugins#css-in-js-syntax).
|
|
20
20
|
|
|
21
|
-
If you'd rather use [postcss-nesting](https://github.com/
|
|
21
|
+
If you'd rather use [postcss-nesting](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-nesting) (which is based on the work-in-progress [CSS Nesting](https://drafts.csswg.org/css-nesting-1/) specification), first install the plugin alongside:
|
|
22
22
|
|
|
23
23
|
```shell
|
|
24
24
|
npm install postcss-nesting
|
package/lib/util/dataTypes.js
CHANGED
|
@@ -49,7 +49,12 @@ function normalize(value, isRoot = true) {
|
|
|
49
49
|
}
|
|
50
50
|
// Add spaces around operators inside calc() that do not follow an operator
|
|
51
51
|
// or '('.
|
|
52
|
-
|
|
52
|
+
value = value.replace(/calc\(.+\)/g, (match)=>{
|
|
53
|
+
return match.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g, "$1 $2 ");
|
|
54
|
+
});
|
|
55
|
+
// Add spaces around some operators not inside calc() that do not follow an operator
|
|
56
|
+
// or '('.
|
|
57
|
+
return value.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([\/])/g, "$1 $2 ");
|
|
53
58
|
}
|
|
54
59
|
function url(value) {
|
|
55
60
|
return value.startsWith("url(");
|
|
@@ -59,8 +64,10 @@ function number(value) {
|
|
|
59
64
|
);
|
|
60
65
|
}
|
|
61
66
|
function percentage(value) {
|
|
62
|
-
return
|
|
63
|
-
|
|
67
|
+
return value.split(UNDERSCORE).every((part)=>{
|
|
68
|
+
return /%$/g.test(part) || cssFunctions.some((fn)=>new RegExp(`^${fn}\\(.+?%`).test(part)
|
|
69
|
+
);
|
|
70
|
+
});
|
|
64
71
|
}
|
|
65
72
|
let lengthUnits = [
|
|
66
73
|
"cm",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tailwindcss",
|
|
3
|
-
"version": "0.0.0-insiders.
|
|
3
|
+
"version": "0.0.0-insiders.e5ed08b",
|
|
4
4
|
"description": "A utility-first CSS framework for rapidly building custom user interfaces.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@swc/jest": "^0.2.20",
|
|
48
48
|
"@swc/register": "^0.1.10",
|
|
49
49
|
"autoprefixer": "^10.4.4",
|
|
50
|
-
"cssnano": "^5.1.
|
|
50
|
+
"cssnano": "^5.1.7",
|
|
51
51
|
"esbuild": "^0.14.25",
|
|
52
52
|
"eslint": "^8.11.0",
|
|
53
53
|
"eslint-config-prettier": "^8.5.0",
|
|
@@ -72,15 +72,15 @@
|
|
|
72
72
|
"fast-glob": "^3.2.11",
|
|
73
73
|
"glob-parent": "^6.0.2",
|
|
74
74
|
"is-glob": "^4.0.3",
|
|
75
|
-
"lilconfig": "^2.0.
|
|
75
|
+
"lilconfig": "^2.0.5",
|
|
76
76
|
"normalize-path": "^3.0.0",
|
|
77
77
|
"object-hash": "^3.0.0",
|
|
78
78
|
"picocolors": "^1.0.0",
|
|
79
79
|
"postcss": "^8.4.12",
|
|
80
80
|
"postcss-js": "^4.0.0",
|
|
81
|
-
"postcss-load-config": "^3.1.
|
|
81
|
+
"postcss-load-config": "^3.1.4",
|
|
82
82
|
"postcss-nested": "5.0.6",
|
|
83
|
-
"postcss-selector-parser": "^6.0.
|
|
83
|
+
"postcss-selector-parser": "^6.0.10",
|
|
84
84
|
"postcss-value-parser": "^4.2.0",
|
|
85
85
|
"quick-lru": "^5.1.1",
|
|
86
86
|
"resolve": "^1.22.0"
|