tailwindcss 3.0.2 → 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 +1905 -0
- package/lib/corePlugins.js +99 -117
- package/lib/css/preflight.css +2 -2
- package/lib/lib/evaluateTailwindFunctions.js +1 -1
- package/lib/lib/expandTailwindAtRules.js +25 -1
- package/lib/lib/generateRules.js +19 -2
- package/lib/lib/setupContextUtils.js +40 -6
- package/lib/util/defaults.js +6 -0
- package/lib/util/log.js +4 -0
- package/lib/util/normalizeConfig.js +34 -5
- package/lib/util/toPath.js +6 -1
- package/package.json +4 -3
- package/peers/index.js +148 -72
- package/src/corePlugins.js +100 -114
- package/src/css/preflight.css +2 -2
- package/src/lib/evaluateTailwindFunctions.js +1 -1
- package/src/lib/expandTailwindAtRules.js +23 -0
- package/src/lib/generateRules.js +24 -2
- package/src/lib/setupContextUtils.js +39 -6
- package/src/util/defaults.js +6 -0
- package/src/util/log.js +4 -0
- package/src/util/normalizeConfig.js +14 -1
- package/src/util/toPath.js +23 -1
- package/stubs/defaultConfig.stub.js +2 -2
- package/peers/.svgo.yml +0 -75
- package/peers/orders/concentric-css.json +0 -299
- package/peers/orders/smacss.json +0 -299
- package/peers/orders/source.json +0 -295
- package/src/.DS_Store +0 -0
package/peers/index.js
CHANGED
|
@@ -52842,44 +52842,48 @@ var require_walker = __commonJS({
|
|
|
52842
52842
|
var require_package = __commonJS({
|
|
52843
52843
|
"node_modules/css-tree/package.json"(exports2, module2) {
|
|
52844
52844
|
module2.exports = {
|
|
52845
|
-
|
|
52846
|
-
|
|
52847
|
-
|
|
52848
|
-
|
|
52849
|
-
|
|
52850
|
-
repository: "csstree/csstree",
|
|
52851
|
-
keywords: [
|
|
52852
|
-
"css",
|
|
52853
|
-
"ast",
|
|
52854
|
-
"tokenizer",
|
|
52855
|
-
"parser",
|
|
52856
|
-
"walker",
|
|
52857
|
-
"lexer",
|
|
52858
|
-
"generator",
|
|
52859
|
-
"utils",
|
|
52860
|
-
"syntax",
|
|
52861
|
-
"validation"
|
|
52845
|
+
_args: [
|
|
52846
|
+
[
|
|
52847
|
+
"css-tree@1.1.3",
|
|
52848
|
+
"/home/runner/work/tailwindcss/tailwindcss"
|
|
52849
|
+
]
|
|
52862
52850
|
],
|
|
52863
|
-
|
|
52864
|
-
|
|
52865
|
-
|
|
52866
|
-
|
|
52867
|
-
|
|
52868
|
-
|
|
52869
|
-
|
|
52870
|
-
|
|
52871
|
-
|
|
52872
|
-
|
|
52873
|
-
|
|
52874
|
-
|
|
52875
|
-
|
|
52876
|
-
|
|
52877
|
-
|
|
52851
|
+
_from: "css-tree@1.1.3",
|
|
52852
|
+
_id: "css-tree@1.1.3",
|
|
52853
|
+
_inBundle: false,
|
|
52854
|
+
_integrity: "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==",
|
|
52855
|
+
_location: "/css-tree",
|
|
52856
|
+
_phantomChildren: {},
|
|
52857
|
+
_requested: {
|
|
52858
|
+
type: "version",
|
|
52859
|
+
registry: true,
|
|
52860
|
+
raw: "css-tree@1.1.3",
|
|
52861
|
+
name: "css-tree",
|
|
52862
|
+
escapedName: "css-tree",
|
|
52863
|
+
rawSpec: "1.1.3",
|
|
52864
|
+
saveSpec: null,
|
|
52865
|
+
fetchSpec: "1.1.3"
|
|
52866
|
+
},
|
|
52867
|
+
_requiredBy: [
|
|
52868
|
+
"/csso",
|
|
52869
|
+
"/svgo"
|
|
52870
|
+
],
|
|
52871
|
+
_resolved: "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz",
|
|
52872
|
+
_spec: "1.1.3",
|
|
52873
|
+
_where: "/home/runner/work/tailwindcss/tailwindcss",
|
|
52874
|
+
author: {
|
|
52875
|
+
name: "Roman Dvornov",
|
|
52876
|
+
email: "rdvornov@gmail.com",
|
|
52877
|
+
url: "https://github.com/lahmatiy"
|
|
52878
|
+
},
|
|
52879
|
+
bugs: {
|
|
52880
|
+
url: "https://github.com/csstree/csstree/issues"
|
|
52878
52881
|
},
|
|
52879
52882
|
dependencies: {
|
|
52880
52883
|
"mdn-data": "2.0.14",
|
|
52881
52884
|
"source-map": "^0.6.1"
|
|
52882
52885
|
},
|
|
52886
|
+
description: "A tool set for CSS: fast detailed parser (CSS \u2192 AST), walker (AST traversal), generator (AST \u2192 CSS) and lexer (validation and matching) based on specs and browser implementations",
|
|
52883
52887
|
devDependencies: {
|
|
52884
52888
|
"@rollup/plugin-commonjs": "^11.0.2",
|
|
52885
52889
|
"@rollup/plugin-json": "^4.0.2",
|
|
@@ -52899,7 +52903,43 @@ var require_package = __commonJS({
|
|
|
52899
52903
|
"data",
|
|
52900
52904
|
"dist",
|
|
52901
52905
|
"lib"
|
|
52902
|
-
]
|
|
52906
|
+
],
|
|
52907
|
+
homepage: "https://github.com/csstree/csstree#readme",
|
|
52908
|
+
jsdelivr: "dist/csstree.min.js",
|
|
52909
|
+
keywords: [
|
|
52910
|
+
"css",
|
|
52911
|
+
"ast",
|
|
52912
|
+
"tokenizer",
|
|
52913
|
+
"parser",
|
|
52914
|
+
"walker",
|
|
52915
|
+
"lexer",
|
|
52916
|
+
"generator",
|
|
52917
|
+
"utils",
|
|
52918
|
+
"syntax",
|
|
52919
|
+
"validation"
|
|
52920
|
+
],
|
|
52921
|
+
license: "MIT",
|
|
52922
|
+
main: "lib/index.js",
|
|
52923
|
+
name: "css-tree",
|
|
52924
|
+
repository: {
|
|
52925
|
+
type: "git",
|
|
52926
|
+
url: "git+https://github.com/csstree/csstree.git"
|
|
52927
|
+
},
|
|
52928
|
+
scripts: {
|
|
52929
|
+
build: "rollup --config",
|
|
52930
|
+
coverage: "nyc npm test",
|
|
52931
|
+
coveralls: "nyc report --reporter=text-lcov | coveralls",
|
|
52932
|
+
hydrogen: "node --trace-hydrogen --trace-phase=Z --trace-deopt --code-comments --hydrogen-track-positions --redirect-code-traces --redirect-code-traces-to=code.asm --trace_hydrogen_file=code.cfg --print-opt-code bin/parse --stat -o /dev/null",
|
|
52933
|
+
lint: "eslint data lib scripts test && node scripts/review-syntax-patch --lint && node scripts/update-docs --lint",
|
|
52934
|
+
"lint-and-test": "npm run lint && npm test",
|
|
52935
|
+
prepublishOnly: "npm run build",
|
|
52936
|
+
"review:syntax-patch": "node scripts/review-syntax-patch",
|
|
52937
|
+
test: "mocha --reporter progress",
|
|
52938
|
+
travis: "nyc npm run lint-and-test && npm run coveralls",
|
|
52939
|
+
"update:docs": "node scripts/update-docs"
|
|
52940
|
+
},
|
|
52941
|
+
unpkg: "dist/csstree.min.js",
|
|
52942
|
+
version: "1.1.3"
|
|
52903
52943
|
};
|
|
52904
52944
|
}
|
|
52905
52945
|
});
|
|
@@ -56477,50 +56517,49 @@ var require_compress = __commonJS({
|
|
|
56477
56517
|
var require_package2 = __commonJS({
|
|
56478
56518
|
"node_modules/csso/package.json"(exports2, module2) {
|
|
56479
56519
|
module2.exports = {
|
|
56480
|
-
|
|
56481
|
-
|
|
56482
|
-
|
|
56483
|
-
|
|
56484
|
-
|
|
56485
|
-
maintainers: [
|
|
56486
|
-
{
|
|
56487
|
-
name: "Roman Dvornov",
|
|
56488
|
-
email: "rdvornov@gmail.com",
|
|
56489
|
-
"github-username": "lahmatiy"
|
|
56490
|
-
}
|
|
56520
|
+
_args: [
|
|
56521
|
+
[
|
|
56522
|
+
"csso@4.2.0",
|
|
56523
|
+
"/home/runner/work/tailwindcss/tailwindcss"
|
|
56524
|
+
]
|
|
56491
56525
|
],
|
|
56492
|
-
|
|
56493
|
-
|
|
56526
|
+
_from: "csso@4.2.0",
|
|
56527
|
+
_id: "csso@4.2.0",
|
|
56528
|
+
_inBundle: false,
|
|
56529
|
+
_integrity: "sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==",
|
|
56530
|
+
_location: "/csso",
|
|
56531
|
+
_phantomChildren: {},
|
|
56532
|
+
_requested: {
|
|
56533
|
+
type: "version",
|
|
56534
|
+
registry: true,
|
|
56535
|
+
raw: "csso@4.2.0",
|
|
56536
|
+
name: "csso",
|
|
56537
|
+
escapedName: "csso",
|
|
56538
|
+
rawSpec: "4.2.0",
|
|
56539
|
+
saveSpec: null,
|
|
56540
|
+
fetchSpec: "4.2.0"
|
|
56541
|
+
},
|
|
56542
|
+
_requiredBy: [
|
|
56543
|
+
"/svgo"
|
|
56544
|
+
],
|
|
56545
|
+
_resolved: "https://registry.npmjs.org/csso/-/csso-4.2.0.tgz",
|
|
56546
|
+
_spec: "4.2.0",
|
|
56547
|
+
_where: "/home/runner/work/tailwindcss/tailwindcss",
|
|
56548
|
+
author: {
|
|
56549
|
+
name: "Sergey Kryzhanovsky",
|
|
56550
|
+
email: "skryzhanovsky@ya.ru",
|
|
56551
|
+
url: "https://github.com/afelix"
|
|
56552
|
+
},
|
|
56553
|
+
browser: {
|
|
56554
|
+
"css-tree": "css-tree/dist/csstree.min.js"
|
|
56555
|
+
},
|
|
56494
56556
|
bugs: {
|
|
56495
56557
|
url: "https://github.com/css/csso/issues"
|
|
56496
56558
|
},
|
|
56497
|
-
keywords: [
|
|
56498
|
-
"css",
|
|
56499
|
-
"compress",
|
|
56500
|
-
"minifier",
|
|
56501
|
-
"minify",
|
|
56502
|
-
"optimise",
|
|
56503
|
-
"optimisation",
|
|
56504
|
-
"csstree"
|
|
56505
|
-
],
|
|
56506
|
-
main: "./lib/index",
|
|
56507
|
-
scripts: {
|
|
56508
|
-
test: "mocha --reporter dot",
|
|
56509
|
-
lint: "eslint lib test",
|
|
56510
|
-
"lint-and-test": "npm run lint && npm test",
|
|
56511
|
-
build: "rollup --config && terser dist/csso.js --compress --mangle -o dist/csso.min.js",
|
|
56512
|
-
coverage: "nyc npm test",
|
|
56513
|
-
coveralls: "nyc report --reporter=text-lcov | coveralls",
|
|
56514
|
-
travis: "nyc npm run lint-and-test && npm run coveralls",
|
|
56515
|
-
hydrogen: "node --trace-hydrogen --trace-phase=Z --trace-deopt --code-comments --hydrogen-track-positions --redirect-code-traces --redirect-code-traces-to=code.asm --trace_hydrogen_file=code.cfg --print-opt-code bin/csso --stat -o /dev/null",
|
|
56516
|
-
prepublishOnly: "npm run build"
|
|
56517
|
-
},
|
|
56518
56559
|
dependencies: {
|
|
56519
56560
|
"css-tree": "^1.1.2"
|
|
56520
56561
|
},
|
|
56521
|
-
|
|
56522
|
-
"css-tree": "css-tree/dist/csstree.min.js"
|
|
56523
|
-
},
|
|
56562
|
+
description: "CSS minifier with structural optimisations",
|
|
56524
56563
|
devDependencies: {
|
|
56525
56564
|
"@rollup/plugin-commonjs": "^11.0.1",
|
|
56526
56565
|
"@rollup/plugin-json": "^4.0.1",
|
|
@@ -56539,7 +56578,42 @@ var require_package2 = __commonJS({
|
|
|
56539
56578
|
files: [
|
|
56540
56579
|
"dist",
|
|
56541
56580
|
"lib"
|
|
56542
|
-
]
|
|
56581
|
+
],
|
|
56582
|
+
homepage: "https://github.com/css/csso",
|
|
56583
|
+
keywords: [
|
|
56584
|
+
"css",
|
|
56585
|
+
"compress",
|
|
56586
|
+
"minifier",
|
|
56587
|
+
"minify",
|
|
56588
|
+
"optimise",
|
|
56589
|
+
"optimisation",
|
|
56590
|
+
"csstree"
|
|
56591
|
+
],
|
|
56592
|
+
license: "MIT",
|
|
56593
|
+
main: "./lib/index",
|
|
56594
|
+
maintainers: [
|
|
56595
|
+
{
|
|
56596
|
+
name: "Roman Dvornov",
|
|
56597
|
+
email: "rdvornov@gmail.com"
|
|
56598
|
+
}
|
|
56599
|
+
],
|
|
56600
|
+
name: "csso",
|
|
56601
|
+
repository: {
|
|
56602
|
+
type: "git",
|
|
56603
|
+
url: "git+https://github.com/css/csso.git"
|
|
56604
|
+
},
|
|
56605
|
+
scripts: {
|
|
56606
|
+
build: "rollup --config && terser dist/csso.js --compress --mangle -o dist/csso.min.js",
|
|
56607
|
+
coverage: "nyc npm test",
|
|
56608
|
+
coveralls: "nyc report --reporter=text-lcov | coveralls",
|
|
56609
|
+
hydrogen: "node --trace-hydrogen --trace-phase=Z --trace-deopt --code-comments --hydrogen-track-positions --redirect-code-traces --redirect-code-traces-to=code.asm --trace_hydrogen_file=code.cfg --print-opt-code bin/csso --stat -o /dev/null",
|
|
56610
|
+
lint: "eslint lib test",
|
|
56611
|
+
"lint-and-test": "npm run lint && npm test",
|
|
56612
|
+
prepublishOnly: "npm run build",
|
|
56613
|
+
test: "mocha --reporter dot",
|
|
56614
|
+
travis: "nyc npm run lint-and-test && npm run coveralls"
|
|
56615
|
+
},
|
|
56616
|
+
version: "4.2.0"
|
|
56543
56617
|
};
|
|
56544
56618
|
}
|
|
56545
56619
|
});
|
|
@@ -67023,7 +67097,9 @@ var require_parser4 = __commonJS({
|
|
|
67023
67097
|
nextToken = this.nextToken;
|
|
67024
67098
|
}
|
|
67025
67099
|
var hasClass = indexesOf(word, ".").filter(function(i) {
|
|
67026
|
-
|
|
67100
|
+
var escapedDot = word[i - 1] === "\\";
|
|
67101
|
+
var isKeyframesPercent = /^\d+\.\d+%$/.test(word);
|
|
67102
|
+
return !escapedDot && !isKeyframesPercent;
|
|
67027
67103
|
});
|
|
67028
67104
|
var hasId = indexesOf(word, "#").filter(function(i) {
|
|
67029
67105
|
return word[i - 1] !== "\\";
|
package/src/corePlugins.js
CHANGED
|
@@ -529,27 +529,26 @@ export let corePlugins = {
|
|
|
529
529
|
{ supportsNegativeValues: true }
|
|
530
530
|
),
|
|
531
531
|
|
|
532
|
-
transform: ({
|
|
533
|
-
|
|
534
|
-
'
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
'--tw-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
].join(' '),
|
|
551
|
-
},
|
|
532
|
+
transform: ({ addDefaults, addUtilities }) => {
|
|
533
|
+
addDefaults('transform', {
|
|
534
|
+
'--tw-translate-x': '0',
|
|
535
|
+
'--tw-translate-y': '0',
|
|
536
|
+
'--tw-rotate': '0',
|
|
537
|
+
'--tw-skew-x': '0',
|
|
538
|
+
'--tw-skew-y': '0',
|
|
539
|
+
'--tw-scale-x': '1',
|
|
540
|
+
'--tw-scale-y': '1',
|
|
541
|
+
'--tw-transform': [
|
|
542
|
+
'translateX(var(--tw-translate-x))',
|
|
543
|
+
'translateY(var(--tw-translate-y))',
|
|
544
|
+
'rotate(var(--tw-rotate))',
|
|
545
|
+
'skewX(var(--tw-skew-x))',
|
|
546
|
+
'skewY(var(--tw-skew-y))',
|
|
547
|
+
'scaleX(var(--tw-scale-x))',
|
|
548
|
+
'scaleY(var(--tw-scale-y))',
|
|
549
|
+
].join(' '),
|
|
552
550
|
})
|
|
551
|
+
|
|
553
552
|
addUtilities({
|
|
554
553
|
'.transform': { '@defaults transform': {}, transform: 'var(--tw-transform)' },
|
|
555
554
|
'.transform-cpu': {
|
|
@@ -611,14 +610,12 @@ export let corePlugins = {
|
|
|
611
610
|
|
|
612
611
|
cursor: createUtilityPlugin('cursor'),
|
|
613
612
|
|
|
614
|
-
touchAction: ({
|
|
615
|
-
|
|
616
|
-
'
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
'--tw-touch-action': 'var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)',
|
|
621
|
-
},
|
|
613
|
+
touchAction: ({ addDefaults, addUtilities }) => {
|
|
614
|
+
addDefaults('touch-action', {
|
|
615
|
+
'--tw-pan-x': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
616
|
+
'--tw-pan-y': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
617
|
+
'--tw-pinch-zoom': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
618
|
+
'--tw-touch-action': 'var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)',
|
|
622
619
|
})
|
|
623
620
|
|
|
624
621
|
addUtilities({
|
|
@@ -681,11 +678,9 @@ export let corePlugins = {
|
|
|
681
678
|
})
|
|
682
679
|
},
|
|
683
680
|
|
|
684
|
-
scrollSnapType: ({
|
|
685
|
-
|
|
686
|
-
'
|
|
687
|
-
'--tw-scroll-snap-strictness': 'proximity',
|
|
688
|
-
},
|
|
681
|
+
scrollSnapType: ({ addDefaults, addUtilities }) => {
|
|
682
|
+
addDefaults('scroll-snap-type', {
|
|
683
|
+
'--tw-scroll-snap-strictness': 'proximity',
|
|
689
684
|
})
|
|
690
685
|
|
|
691
686
|
addUtilities({
|
|
@@ -1182,22 +1177,21 @@ export let corePlugins = {
|
|
|
1182
1177
|
})
|
|
1183
1178
|
},
|
|
1184
1179
|
|
|
1185
|
-
borderColor: ({
|
|
1180
|
+
borderColor: ({ addDefaults, matchUtilities, theme, corePlugins }) => {
|
|
1186
1181
|
if (!corePlugins('borderOpacity')) {
|
|
1187
1182
|
let value = theme('borderColor.DEFAULT', 'currentColor')
|
|
1188
|
-
|
|
1189
|
-
'
|
|
1190
|
-
'border-color': toColorValue(value),
|
|
1191
|
-
},
|
|
1183
|
+
addDefaults('border-width', {
|
|
1184
|
+
'border-color': toColorValue(value),
|
|
1192
1185
|
})
|
|
1193
1186
|
} else {
|
|
1194
|
-
|
|
1195
|
-
'
|
|
1187
|
+
addDefaults(
|
|
1188
|
+
'border-width',
|
|
1189
|
+
withAlphaVariable({
|
|
1196
1190
|
color: theme('borderColor.DEFAULT', 'currentColor'),
|
|
1197
1191
|
property: 'border-color',
|
|
1198
1192
|
variable: '--tw-border-opacity',
|
|
1199
|
-
})
|
|
1200
|
-
|
|
1193
|
+
})
|
|
1194
|
+
)
|
|
1201
1195
|
}
|
|
1202
1196
|
|
|
1203
1197
|
matchUtilities(
|
|
@@ -1660,10 +1654,10 @@ export let corePlugins = {
|
|
|
1660
1654
|
|
|
1661
1655
|
textDecoration: ({ addUtilities }) => {
|
|
1662
1656
|
addUtilities({
|
|
1663
|
-
'.underline': { 'text-decoration': 'underline' },
|
|
1664
|
-
'.overline': { 'text-decoration': 'overline' },
|
|
1665
|
-
'.line-through': { 'text-decoration': 'line-through' },
|
|
1666
|
-
'.no-underline': { 'text-decoration': 'none' },
|
|
1657
|
+
'.underline': { 'text-decoration-line': 'underline' },
|
|
1658
|
+
'.overline': { 'text-decoration-line': 'overline' },
|
|
1659
|
+
'.line-through': { 'text-decoration-line': 'line-through' },
|
|
1660
|
+
'.no-underline': { 'text-decoration-line': 'none' },
|
|
1667
1661
|
})
|
|
1668
1662
|
},
|
|
1669
1663
|
|
|
@@ -1823,14 +1817,12 @@ export let corePlugins = {
|
|
|
1823
1817
|
`var(--tw-shadow)`,
|
|
1824
1818
|
].join(', ')
|
|
1825
1819
|
|
|
1826
|
-
return function ({ matchUtilities,
|
|
1827
|
-
|
|
1828
|
-
'
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
'--tw-shadow-colored': '0 0 #0000',
|
|
1833
|
-
},
|
|
1820
|
+
return function ({ matchUtilities, addDefaults, theme }) {
|
|
1821
|
+
addDefaults(' box-shadow', {
|
|
1822
|
+
'--tw-ring-offset-shadow': '0 0 #0000',
|
|
1823
|
+
'--tw-ring-shadow': '0 0 #0000',
|
|
1824
|
+
'--tw-shadow': '0 0 #0000',
|
|
1825
|
+
'--tw-shadow-colored': '0 0 #0000',
|
|
1834
1826
|
})
|
|
1835
1827
|
|
|
1836
1828
|
matchUtilities(
|
|
@@ -1908,7 +1900,7 @@ export let corePlugins = {
|
|
|
1908
1900
|
)
|
|
1909
1901
|
},
|
|
1910
1902
|
|
|
1911
|
-
ringWidth: ({ matchUtilities,
|
|
1903
|
+
ringWidth: ({ matchUtilities, addDefaults, addUtilities, theme }) => {
|
|
1912
1904
|
let ringOpacityDefault = theme('ringOpacity.DEFAULT', '0.5')
|
|
1913
1905
|
let ringColorDefault = withAlphaValue(
|
|
1914
1906
|
theme('ringColor.DEFAULT'),
|
|
@@ -1916,17 +1908,15 @@ export let corePlugins = {
|
|
|
1916
1908
|
`rgb(147 197 253 / ${ringOpacityDefault})`
|
|
1917
1909
|
)
|
|
1918
1910
|
|
|
1919
|
-
|
|
1920
|
-
'
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
'--tw-shadow-colored': '0 0 #0000',
|
|
1929
|
-
},
|
|
1911
|
+
addDefaults('ring-width', {
|
|
1912
|
+
'--tw-ring-inset': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
1913
|
+
'--tw-ring-offset-width': theme('ringOffsetWidth.DEFAULT', '0px'),
|
|
1914
|
+
'--tw-ring-offset-color': theme('ringOffsetColor.DEFAULT', '#fff'),
|
|
1915
|
+
'--tw-ring-color': ringColorDefault,
|
|
1916
|
+
'--tw-ring-offset-shadow': '0 0 #0000',
|
|
1917
|
+
'--tw-ring-shadow': '0 0 #0000',
|
|
1918
|
+
'--tw-shadow': '0 0 #0000',
|
|
1919
|
+
'--tw-shadow-colored': '0 0 #0000',
|
|
1930
1920
|
})
|
|
1931
1921
|
|
|
1932
1922
|
matchUtilities(
|
|
@@ -2133,30 +2123,28 @@ export let corePlugins = {
|
|
|
2133
2123
|
)
|
|
2134
2124
|
},
|
|
2135
2125
|
|
|
2136
|
-
filter: ({
|
|
2137
|
-
|
|
2138
|
-
'
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
'--tw-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
].join(' '),
|
|
2159
|
-
},
|
|
2126
|
+
filter: ({ addDefaults, addUtilities }) => {
|
|
2127
|
+
addDefaults('filter', {
|
|
2128
|
+
'--tw-blur': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2129
|
+
'--tw-brightness': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2130
|
+
'--tw-contrast': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2131
|
+
'--tw-grayscale': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2132
|
+
'--tw-hue-rotate': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2133
|
+
'--tw-invert': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2134
|
+
'--tw-saturate': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2135
|
+
'--tw-sepia': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2136
|
+
'--tw-drop-shadow': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2137
|
+
'--tw-filter': [
|
|
2138
|
+
'var(--tw-blur)',
|
|
2139
|
+
'var(--tw-brightness)',
|
|
2140
|
+
'var(--tw-contrast)',
|
|
2141
|
+
'var(--tw-grayscale)',
|
|
2142
|
+
'var(--tw-hue-rotate)',
|
|
2143
|
+
'var(--tw-invert)',
|
|
2144
|
+
'var(--tw-saturate)',
|
|
2145
|
+
'var(--tw-sepia)',
|
|
2146
|
+
'var(--tw-drop-shadow)',
|
|
2147
|
+
].join(' '),
|
|
2160
2148
|
})
|
|
2161
2149
|
addUtilities({
|
|
2162
2150
|
'.filter': { '@defaults filter': {}, filter: 'var(--tw-filter)' },
|
|
@@ -2299,30 +2287,28 @@ export let corePlugins = {
|
|
|
2299
2287
|
)
|
|
2300
2288
|
},
|
|
2301
2289
|
|
|
2302
|
-
backdropFilter: ({
|
|
2303
|
-
|
|
2304
|
-
'
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
'--tw-backdrop-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
].join(' '),
|
|
2325
|
-
},
|
|
2290
|
+
backdropFilter: ({ addDefaults, addUtilities }) => {
|
|
2291
|
+
addDefaults('backdrop-filter', {
|
|
2292
|
+
'--tw-backdrop-blur': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2293
|
+
'--tw-backdrop-brightness': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2294
|
+
'--tw-backdrop-contrast': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2295
|
+
'--tw-backdrop-grayscale': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2296
|
+
'--tw-backdrop-hue-rotate': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2297
|
+
'--tw-backdrop-invert': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2298
|
+
'--tw-backdrop-opacity': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2299
|
+
'--tw-backdrop-saturate': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2300
|
+
'--tw-backdrop-sepia': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2301
|
+
'--tw-backdrop-filter': [
|
|
2302
|
+
'var(--tw-backdrop-blur)',
|
|
2303
|
+
'var(--tw-backdrop-brightness)',
|
|
2304
|
+
'var(--tw-backdrop-contrast)',
|
|
2305
|
+
'var(--tw-backdrop-grayscale)',
|
|
2306
|
+
'var(--tw-backdrop-hue-rotate)',
|
|
2307
|
+
'var(--tw-backdrop-invert)',
|
|
2308
|
+
'var(--tw-backdrop-opacity)',
|
|
2309
|
+
'var(--tw-backdrop-saturate)',
|
|
2310
|
+
'var(--tw-backdrop-sepia)',
|
|
2311
|
+
].join(' '),
|
|
2326
2312
|
})
|
|
2327
2313
|
addUtilities({
|
|
2328
2314
|
'.backdrop-filter': {
|
package/src/css/preflight.css
CHANGED
|
@@ -144,7 +144,7 @@ sup {
|
|
|
144
144
|
table {
|
|
145
145
|
text-indent: 0; /* 1 */
|
|
146
146
|
border-color: inherit; /* 2 */
|
|
147
|
-
border-collapse: collapse;
|
|
147
|
+
border-collapse: collapse; /* 3 */
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
/*
|
|
@@ -310,7 +310,7 @@ textarea {
|
|
|
310
310
|
|
|
311
311
|
input::placeholder,
|
|
312
312
|
textarea::placeholder {
|
|
313
|
-
opacity: 1;
|
|
313
|
+
opacity: 1; /* 1 */
|
|
314
314
|
color: theme('colors.gray.400', #9ca3af); /* 2 */
|
|
315
315
|
}
|
|
316
316
|
|
|
@@ -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.`
|
|
@@ -99,6 +99,7 @@ function buildStylesheet(rules, context) {
|
|
|
99
99
|
|
|
100
100
|
let returnValue = {
|
|
101
101
|
base: new Set(),
|
|
102
|
+
defaults: new Set(),
|
|
102
103
|
components: new Set(),
|
|
103
104
|
utilities: new Set(),
|
|
104
105
|
variants: new Set(),
|
|
@@ -125,6 +126,11 @@ function buildStylesheet(rules, context) {
|
|
|
125
126
|
continue
|
|
126
127
|
}
|
|
127
128
|
|
|
129
|
+
if (sort & context.layerOrder.defaults) {
|
|
130
|
+
returnValue.defaults.add(rule)
|
|
131
|
+
continue
|
|
132
|
+
}
|
|
133
|
+
|
|
128
134
|
if (sort & context.layerOrder.components) {
|
|
129
135
|
returnValue.components.add(rule)
|
|
130
136
|
continue
|
|
@@ -144,6 +150,8 @@ function buildStylesheet(rules, context) {
|
|
|
144
150
|
return returnValue
|
|
145
151
|
}
|
|
146
152
|
|
|
153
|
+
export const DEFAULTS_LAYER = Symbol('defaults-layer')
|
|
154
|
+
|
|
147
155
|
export default function expandTailwindAtRules(context) {
|
|
148
156
|
return (root) => {
|
|
149
157
|
let layerNodes = {
|
|
@@ -202,6 +210,7 @@ export default function expandTailwindAtRules(context) {
|
|
|
202
210
|
env.DEBUG && console.timeEnd('Build stylesheet')
|
|
203
211
|
|
|
204
212
|
let {
|
|
213
|
+
defaults: defaultNodes,
|
|
205
214
|
base: baseNodes,
|
|
206
215
|
components: componentNodes,
|
|
207
216
|
utilities: utilityNodes,
|
|
@@ -214,6 +223,20 @@ export default function expandTailwindAtRules(context) {
|
|
|
214
223
|
|
|
215
224
|
if (layerNodes.base) {
|
|
216
225
|
layerNodes.base.before(cloneNodes([...baseNodes], layerNodes.base.source))
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// @defaults rules are unconditionally added first to ensure that
|
|
229
|
+
// using any utility that relies on defaults will work even when
|
|
230
|
+
// compiled in an isolated environment like CSS modules
|
|
231
|
+
if (context.tailwindConfig[DEFAULTS_LAYER] !== false) {
|
|
232
|
+
if (layerNodes.base) {
|
|
233
|
+
layerNodes.base.after(cloneNodes([...defaultNodes], root.source))
|
|
234
|
+
} else {
|
|
235
|
+
root.prepend(cloneNodes([...defaultNodes], root.source))
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
if (layerNodes.base) {
|
|
217
240
|
layerNodes.base.remove()
|
|
218
241
|
}
|
|
219
242
|
|