tailwindcss 3.0.5 → 3.0.6
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 +11 -3
- package/lib/lib/evaluateTailwindFunctions.js +1 -1
- package/lib/lib/generateRules.js +0 -1
- package/lib/util/toPath.js +6 -1
- package/package.json +2 -2
- package/peers/index.js +3 -1
- package/src/lib/evaluateTailwindFunctions.js +1 -1
- package/src/lib/generateRules.js +0 -1
- package/src/util/toPath.js +23 -1
- package/stubs/defaultConfig.stub.js +2 -2
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
|
- Nothing yet!
|
|
11
11
|
|
|
12
|
+
## [3.0.6] - 2021-12-16
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- Support square bracket notation in paths ([#6519](https://github.com/tailwindlabs/tailwindcss/pull/6519))
|
|
17
|
+
- Ensure all plugins are executed for a given candidate ([#6540](https://github.com/tailwindlabs/tailwindcss/pull/6540))
|
|
18
|
+
|
|
12
19
|
## [3.0.5] - 2021-12-15
|
|
13
20
|
|
|
14
21
|
### Fixed
|
|
@@ -19,7 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
19
26
|
|
|
20
27
|
### Fixed
|
|
21
28
|
|
|
22
|
-
- Insert always
|
|
29
|
+
- Insert always-on defaults layer in correct spot ([#6526](https://github.com/tailwindlabs/tailwindcss/pull/6526))
|
|
23
30
|
|
|
24
31
|
## [3.0.3] - 2021-12-15
|
|
25
32
|
|
|
@@ -34,7 +41,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
34
41
|
- Don't output unparsable values ([#6469](https://github.com/tailwindlabs/tailwindcss/pull/6469))
|
|
35
42
|
- Fix text decoration utilities from overriding the new text decoration color/style/thickness utilities when used with a modifier ([#6378](https://github.com/tailwindlabs/tailwindcss/pull/6378))
|
|
36
43
|
- Move defaults to their own always-on layer ([#6500](https://github.com/tailwindlabs/tailwindcss/pull/6500))
|
|
37
|
-
- Support negative values in safelist patterns ([6480](https://github.com/tailwindlabs/tailwindcss/pull/6480))
|
|
44
|
+
- Support negative values in safelist patterns ([#6480](https://github.com/tailwindlabs/tailwindcss/pull/6480))
|
|
38
45
|
|
|
39
46
|
## [3.0.2] - 2021-12-13
|
|
40
47
|
|
|
@@ -1723,7 +1730,8 @@ No release notes
|
|
|
1723
1730
|
|
|
1724
1731
|
- Everything!
|
|
1725
1732
|
|
|
1726
|
-
[unreleased]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.
|
|
1733
|
+
[unreleased]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.6...HEAD
|
|
1734
|
+
[3.0.6]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.6...v3.0.6
|
|
1727
1735
|
[3.0.5]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.4...v3.0.5
|
|
1728
1736
|
[3.0.4]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.3...v3.0.4
|
|
1729
1737
|
[3.0.3]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.2...v3.0.3
|
|
@@ -43,7 +43,7 @@ function listKeys(obj) {
|
|
|
43
43
|
function validatePath(config, path, defaultValue) {
|
|
44
44
|
const pathString = Array.isArray(path) ? pathToString(path) : path.replace(/^['"]+/g, '').replace(/['"]+$/g, '');
|
|
45
45
|
const pathSegments = Array.isArray(path) ? path : (0, _toPath).toPath(pathString);
|
|
46
|
-
const value = (0, _dlv).default(config.theme,
|
|
46
|
+
const value = (0, _dlv).default(config.theme, pathSegments, defaultValue);
|
|
47
47
|
if (value === undefined) {
|
|
48
48
|
let error = `'${pathString}' does not exist in your theme config.`;
|
|
49
49
|
const parentSegments = pathSegments.slice(0, -1);
|
package/lib/lib/generateRules.js
CHANGED
package/lib/util/toPath.js
CHANGED
|
@@ -5,5 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
exports.toPath = toPath;
|
|
6
6
|
function toPath(path) {
|
|
7
7
|
if (Array.isArray(path)) return path;
|
|
8
|
-
|
|
8
|
+
let openBrackets = path.split('[').length - 1;
|
|
9
|
+
let closedBrackets = path.split(']').length - 1;
|
|
10
|
+
if (openBrackets !== closedBrackets) {
|
|
11
|
+
throw new Error(`Path is invalid. Has unbalanced brackets: ${path}`);
|
|
12
|
+
}
|
|
13
|
+
return path.split(/\.(?![^\[]*\])|[\[\]]/g).filter(Boolean);
|
|
9
14
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tailwindcss",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.6",
|
|
4
4
|
"description": "A utility-first CSS framework for rapidly building custom user interfaces.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"postcss-js": "^3.0.3",
|
|
83
83
|
"postcss-load-config": "^3.1.0",
|
|
84
84
|
"postcss-nested": "5.0.6",
|
|
85
|
-
"postcss-selector-parser": "^6.0.
|
|
85
|
+
"postcss-selector-parser": "^6.0.7",
|
|
86
86
|
"postcss-value-parser": "^4.2.0",
|
|
87
87
|
"quick-lru": "^5.1.1",
|
|
88
88
|
"resolve": "^1.20.0",
|
package/peers/index.js
CHANGED
|
@@ -67097,7 +67097,9 @@ var require_parser4 = __commonJS({
|
|
|
67097
67097
|
nextToken = this.nextToken;
|
|
67098
67098
|
}
|
|
67099
67099
|
var hasClass = indexesOf(word, ".").filter(function(i) {
|
|
67100
|
-
|
|
67100
|
+
var escapedDot = word[i - 1] === "\\";
|
|
67101
|
+
var isKeyframesPercent = /^\d+\.\d+%$/.test(word);
|
|
67102
|
+
return !escapedDot && !isKeyframesPercent;
|
|
67101
67103
|
});
|
|
67102
67104
|
var hasId = indexesOf(word, "#").filter(function(i) {
|
|
67103
67105
|
return word[i - 1] !== "\\";
|
|
@@ -42,7 +42,7 @@ function validatePath(config, path, defaultValue) {
|
|
|
42
42
|
? pathToString(path)
|
|
43
43
|
: path.replace(/^['"]+/g, '').replace(/['"]+$/g, '')
|
|
44
44
|
const pathSegments = Array.isArray(path) ? path : toPath(pathString)
|
|
45
|
-
const value = dlv(config.theme,
|
|
45
|
+
const value = dlv(config.theme, pathSegments, defaultValue)
|
|
46
46
|
|
|
47
47
|
if (value === undefined) {
|
|
48
48
|
let error = `'${pathString}' does not exist in your theme config.`
|
package/src/lib/generateRules.js
CHANGED
|
@@ -325,7 +325,6 @@ function* resolveMatchedPlugins(classCandidate, context) {
|
|
|
325
325
|
for (let [prefix, modifier] of candidatePermutations(candidatePrefix)) {
|
|
326
326
|
if (context.candidateRuleMap.has(prefix)) {
|
|
327
327
|
yield [context.candidateRuleMap.get(prefix), negative ? `-${modifier}` : modifier]
|
|
328
|
-
return
|
|
329
328
|
}
|
|
330
329
|
}
|
|
331
330
|
}
|
package/src/util/toPath.js
CHANGED
|
@@ -1,4 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parse a path string into an array of path segments.
|
|
3
|
+
*
|
|
4
|
+
* Square bracket notation `a[b]` may be used to "escape" dots that would otherwise be interpreted as path separators.
|
|
5
|
+
*
|
|
6
|
+
* Example:
|
|
7
|
+
* a -> ['a]
|
|
8
|
+
* a.b.c -> ['a', 'b', 'c']
|
|
9
|
+
* a[b].c -> ['a', 'b', 'c']
|
|
10
|
+
* a[b.c].e.f -> ['a', 'b.c', 'e', 'f']
|
|
11
|
+
* a[b][c][d] -> ['a', 'b', 'c', 'd']
|
|
12
|
+
*
|
|
13
|
+
* @param {string|string[]} path
|
|
14
|
+
**/
|
|
1
15
|
export function toPath(path) {
|
|
2
16
|
if (Array.isArray(path)) return path
|
|
3
|
-
|
|
17
|
+
|
|
18
|
+
let openBrackets = path.split('[').length - 1
|
|
19
|
+
let closedBrackets = path.split(']').length - 1
|
|
20
|
+
|
|
21
|
+
if (openBrackets !== closedBrackets) {
|
|
22
|
+
throw new Error(`Path is invalid. Has unbalanced brackets: ${path}`)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return path.split(/\.(?![^\[]*\])|[\[\]]/g).filter(Boolean)
|
|
4
26
|
}
|
|
@@ -854,8 +854,8 @@ module.exports = {
|
|
|
854
854
|
none: 'none',
|
|
855
855
|
all: 'all',
|
|
856
856
|
DEFAULT:
|
|
857
|
-
'background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter',
|
|
858
|
-
colors: 'background-color, border-color, color, fill, stroke',
|
|
857
|
+
'color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter',
|
|
858
|
+
colors: 'color, background-color, border-color, text-decoration-color, fill, stroke',
|
|
859
859
|
opacity: 'opacity',
|
|
860
860
|
shadow: 'box-shadow',
|
|
861
861
|
transform: 'transform',
|