tailwindcss 0.0.0-oxide-insiders.dddaded → 0.0.0-oxide-insiders.b2e3cf2
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/lib/cli/build/deps.js +10 -18
- package/lib/cli/build/index.js +10 -41
- package/lib/cli/build/plugin.js +87 -268
- package/lib/cli/build/utils.js +18 -40
- package/lib/cli/build/watching.js +35 -151
- package/lib/cli/help/index.js +15 -58
- package/lib/cli/index.js +61 -120
- package/lib/cli/init/index.js +21 -43
- package/lib/cli-peer-dependencies.js +13 -15
- package/lib/cli.js +1 -5
- package/lib/corePluginList.js +3 -4
- package/lib/corePlugins.js +394 -857
- package/lib/featureFlags.js +14 -34
- package/lib/index.js +1 -5
- package/lib/lib/cacheInvalidation.js +29 -75
- package/lib/lib/collapseAdjacentRules.js +22 -43
- package/lib/lib/collapseDuplicateDeclarations.js +27 -68
- package/lib/lib/content.js +37 -126
- package/lib/lib/defaultExtractor.js +96 -199
- package/lib/lib/detectNesting.js +12 -36
- package/lib/lib/evaluateTailwindFunctions.js +101 -188
- package/lib/lib/expandApplyAtRules.js +177 -482
- package/lib/lib/expandTailwindAtRules.js +69 -237
- package/lib/lib/findAtConfigPath.js +13 -30
- package/lib/lib/generateRules.js +349 -765
- package/lib/lib/getModuleDependencies.js +27 -63
- package/lib/lib/load-config.js +16 -24
- package/lib/lib/normalizeTailwindDirectives.js +26 -70
- package/lib/lib/offsets.js +61 -224
- package/lib/lib/partitionApplyAtRules.js +29 -51
- package/lib/lib/regex.js +22 -30
- package/lib/lib/remap-bitfield.js +9 -84
- package/lib/lib/resolveDefaultsAtRules.js +50 -116
- package/lib/lib/setupContextUtils.js +576 -1099
- package/lib/lib/setupTrackingContext.js +54 -143
- package/lib/lib/sharedState.js +15 -59
- package/lib/lib/substituteScreenAtRules.js +8 -16
- package/lib/oxide/cli/build/deps.js +17 -32
- package/lib/oxide/cli/build/index.js +10 -40
- package/lib/oxide/cli/build/plugin.js +87 -267
- package/lib/oxide/cli/build/utils.js +18 -39
- package/lib/oxide/cli/build/watching.js +34 -149
- package/lib/oxide/cli/help/index.js +15 -57
- package/lib/oxide/cli/index.js +66 -127
- package/lib/oxide/cli/init/index.js +17 -36
- package/lib/oxide/cli.js +2 -3
- package/lib/plugin.js +30 -57
- package/lib/postcss-plugins/nesting/index.js +6 -10
- package/lib/postcss-plugins/nesting/plugin.js +17 -60
- package/lib/processTailwindFeatures.js +8 -37
- package/lib/public/colors.js +15 -22
- package/lib/public/create-plugin.js +5 -8
- package/lib/public/default-config.js +5 -9
- package/lib/public/default-theme.js +5 -9
- package/lib/public/load-config.js +4 -6
- package/lib/public/resolve-config.js +4 -6
- package/lib/util/applyImportantSelector.js +15 -24
- package/lib/util/bigSign.js +6 -7
- package/lib/util/buildMediaQuery.js +10 -17
- package/lib/util/cloneDeep.js +9 -17
- package/lib/util/cloneNodes.js +14 -27
- package/lib/util/color.js +45 -81
- package/lib/util/configurePlugins.js +9 -16
- package/lib/util/createPlugin.js +8 -15
- package/lib/util/createUtilityPlugin.js +15 -27
- package/lib/util/dataTypes.js +23 -144
- package/lib/util/defaults.js +9 -19
- package/lib/util/escapeClassName.js +6 -10
- package/lib/util/escapeCommas.js +6 -7
- package/lib/util/flattenColorPalette.js +6 -8
- package/lib/util/formatVariantSelector.js +49 -190
- package/lib/util/getAllConfigs.js +35 -42
- package/lib/util/hashConfig.js +6 -8
- package/lib/util/isKeyframeRule.js +6 -7
- package/lib/util/isPlainObject.js +8 -11
- package/lib/util/isSyntacticallyValidPropertyValue.js +13 -42
- package/lib/util/log.js +7 -14
- package/lib/util/nameClass.js +6 -21
- package/lib/util/negateValue.js +10 -26
- package/lib/util/normalizeConfig.js +63 -240
- package/lib/util/normalizeScreens.js +70 -137
- package/lib/util/parseAnimationValue.js +13 -61
- package/lib/util/parseBoxShadowValue.js +12 -57
- package/lib/util/parseDependency.js +13 -37
- package/lib/util/parseGlob.js +7 -22
- package/lib/util/parseObjectStyles.js +17 -26
- package/lib/util/pluginUtils.js +69 -176
- package/lib/util/prefixSelector.js +11 -28
- package/lib/util/pseudoElements.js +29 -105
- package/lib/util/removeAlphaVariables.js +8 -21
- package/lib/util/resolveConfig.js +103 -220
- package/lib/util/resolveConfigPath.js +12 -38
- package/lib/util/responsive.js +4 -6
- package/lib/util/splitAtTopLevelOnly.js +10 -44
- package/lib/util/tap.js +6 -8
- package/lib/util/toColorValue.js +6 -7
- package/lib/util/toPath.js +8 -26
- package/lib/util/transformThemeValue.js +12 -45
- package/lib/util/validateConfig.js +14 -22
- package/lib/util/validateFormalSyntax.js +5 -11
- package/lib/util/withAlphaVariable.js +28 -48
- package/package.json +3 -3
- package/peers/index.js +14 -16
- package/src/cli/build/plugin.js +1 -1
- package/src/cli.js +1 -1
- package/src/corePlugins.js +16 -17
- package/src/featureFlags.js +2 -3
- package/src/index.js +1 -5
- package/src/lib/expandTailwindAtRules.js +2 -2
- package/src/lib/sharedState.js +0 -15
- package/src/oxide/cli/build/plugin.ts +1 -1
- package/src/plugin.js +1 -1
|
@@ -1,35 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value:
|
|
4
|
-
})
|
|
5
|
-
|
|
6
|
-
enumerable: true,
|
|
3
|
+
value: !0
|
|
4
|
+
}), Object.defineProperty(exports, "validateConfig", {
|
|
5
|
+
enumerable: !0,
|
|
7
6
|
get: ()=>validateConfig
|
|
8
7
|
});
|
|
9
|
-
const _log =
|
|
10
|
-
function _interopRequireDefault(obj) {
|
|
8
|
+
const _log = function(obj) {
|
|
11
9
|
return obj && obj.__esModule ? obj : {
|
|
12
10
|
default: obj
|
|
13
11
|
};
|
|
14
|
-
}
|
|
12
|
+
}(require("./log"));
|
|
15
13
|
function validateConfig(config) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
]);
|
|
22
|
-
}
|
|
23
|
-
// Warn if the line-clamp plugin is installed
|
|
14
|
+
0 === config.content.files.length && _log.default.warn("content-problems", [
|
|
15
|
+
"The `content` option in your Tailwind CSS configuration is missing or empty.",
|
|
16
|
+
"Configure your content sources or your generated CSS will be missing styles.",
|
|
17
|
+
"https://tailwindcss.com/docs/content-configuration"
|
|
18
|
+
]);
|
|
24
19
|
try {
|
|
25
20
|
let plugin = require("@tailwindcss/line-clamp");
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
]);
|
|
31
|
-
config.plugins = config.plugins.filter((p)=>p !== plugin);
|
|
32
|
-
}
|
|
21
|
+
config.plugins.includes(plugin) && (_log.default.warn("line-clamp-in-core", [
|
|
22
|
+
"As of Tailwind CSS v3.3, the `@tailwindcss/line-clamp` plugin is now included by default.",
|
|
23
|
+
"Remove it from the `plugins` array in your configuration to eliminate this warning."
|
|
24
|
+
]), config.plugins = config.plugins.filter((p)=>p !== plugin));
|
|
33
25
|
} catch {}
|
|
34
26
|
return config;
|
|
35
27
|
}
|
|
@@ -1,24 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value:
|
|
4
|
-
})
|
|
5
|
-
|
|
6
|
-
enumerable: true,
|
|
3
|
+
value: !0
|
|
4
|
+
}), Object.defineProperty(exports, "backgroundSize", {
|
|
5
|
+
enumerable: !0,
|
|
7
6
|
get: ()=>backgroundSize
|
|
8
7
|
});
|
|
9
|
-
const _dataTypes = require("./dataTypes");
|
|
10
|
-
const _splitAtTopLevelOnly = require("./splitAtTopLevelOnly");
|
|
8
|
+
const _dataTypes = require("./dataTypes"), _splitAtTopLevelOnly = require("./splitAtTopLevelOnly");
|
|
11
9
|
function backgroundSize(value) {
|
|
12
10
|
let keywordValues = [
|
|
13
11
|
"cover",
|
|
14
12
|
"contain"
|
|
15
13
|
];
|
|
16
|
-
// the <length-percentage> type will probably be a css function
|
|
17
|
-
// so we have to use `splitAtTopLevelOnly`
|
|
18
14
|
return (0, _splitAtTopLevelOnly.splitAtTopLevelOnly)(value, ",").every((part)=>{
|
|
19
15
|
let sizes = (0, _splitAtTopLevelOnly.splitAtTopLevelOnly)(part, "_").filter(Boolean);
|
|
20
|
-
|
|
21
|
-
if (sizes.length !== 1 && sizes.length !== 2) return false;
|
|
22
|
-
return sizes.every((size)=>(0, _dataTypes.length)(size) || (0, _dataTypes.percentage)(size) || size === "auto");
|
|
16
|
+
return !!(1 === sizes.length && keywordValues.includes(sizes[0])) || (1 === sizes.length || 2 === sizes.length) && sizes.every((size)=>(0, _dataTypes.length)(size) || (0, _dataTypes.percentage)(size) || "auto" === size);
|
|
23
17
|
});
|
|
24
18
|
}
|
|
@@ -1,75 +1,55 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value:
|
|
4
|
-
})
|
|
5
|
-
function _export(target, all) {
|
|
3
|
+
value: !0
|
|
4
|
+
}), function(target, all) {
|
|
6
5
|
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
-
enumerable:
|
|
6
|
+
enumerable: !0,
|
|
8
7
|
get: all[name]
|
|
9
8
|
});
|
|
10
|
-
}
|
|
11
|
-
_export(exports, {
|
|
9
|
+
}(exports, {
|
|
12
10
|
withAlphaValue: ()=>withAlphaValue,
|
|
13
11
|
default: ()=>withAlphaVariable
|
|
14
12
|
});
|
|
15
13
|
const _color = require("./color");
|
|
16
14
|
function withAlphaValue(color, alphaValue, defaultValue) {
|
|
17
|
-
if (typeof color
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
});
|
|
21
|
-
}
|
|
15
|
+
if ("function" == typeof color) return color({
|
|
16
|
+
opacityValue: alphaValue
|
|
17
|
+
});
|
|
22
18
|
let parsed = (0, _color.parseColor)(color, {
|
|
23
|
-
loose:
|
|
19
|
+
loose: !0
|
|
24
20
|
});
|
|
25
|
-
|
|
26
|
-
return defaultValue;
|
|
27
|
-
}
|
|
28
|
-
return (0, _color.formatColor)({
|
|
21
|
+
return null === parsed ? defaultValue : (0, _color.formatColor)({
|
|
29
22
|
...parsed,
|
|
30
23
|
alpha: alphaValue
|
|
31
24
|
});
|
|
32
25
|
}
|
|
33
26
|
function withAlphaVariable({ color , property , variable }) {
|
|
34
27
|
let properties = [].concat(property);
|
|
35
|
-
if (typeof color
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
...Object.fromEntries(properties.map((p)=>{
|
|
39
|
-
return [
|
|
40
|
-
p,
|
|
41
|
-
color({
|
|
42
|
-
opacityVariable: variable,
|
|
43
|
-
opacityValue: `var(${variable})`
|
|
44
|
-
})
|
|
45
|
-
];
|
|
46
|
-
}))
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
const parsed = (0, _color.parseColor)(color);
|
|
50
|
-
if (parsed === null) {
|
|
51
|
-
return Object.fromEntries(properties.map((p)=>[
|
|
52
|
-
p,
|
|
53
|
-
color
|
|
54
|
-
]));
|
|
55
|
-
}
|
|
56
|
-
if (parsed.alpha !== undefined) {
|
|
57
|
-
// Has an alpha value, return color as-is
|
|
58
|
-
return Object.fromEntries(properties.map((p)=>[
|
|
28
|
+
if ("function" == typeof color) return {
|
|
29
|
+
[variable]: "1",
|
|
30
|
+
...Object.fromEntries(properties.map((p)=>[
|
|
59
31
|
p,
|
|
60
|
-
color
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
32
|
+
color({
|
|
33
|
+
opacityVariable: variable,
|
|
34
|
+
opacityValue: `var(${variable})`
|
|
35
|
+
})
|
|
36
|
+
]))
|
|
37
|
+
};
|
|
38
|
+
let parsed = (0, _color.parseColor)(color);
|
|
39
|
+
return null === parsed ? Object.fromEntries(properties.map((p)=>[
|
|
40
|
+
p,
|
|
41
|
+
color
|
|
42
|
+
])) : void 0 !== parsed.alpha ? Object.fromEntries(properties.map((p)=>[
|
|
43
|
+
p,
|
|
44
|
+
color
|
|
45
|
+
])) : {
|
|
64
46
|
[variable]: "1",
|
|
65
|
-
...Object.fromEntries(properties.map((p)=>
|
|
66
|
-
return [
|
|
47
|
+
...Object.fromEntries(properties.map((p)=>[
|
|
67
48
|
p,
|
|
68
49
|
(0, _color.formatColor)({
|
|
69
50
|
...parsed,
|
|
70
51
|
alpha: `var(${variable})`
|
|
71
52
|
})
|
|
72
|
-
]
|
|
73
|
-
}))
|
|
53
|
+
]))
|
|
74
54
|
};
|
|
75
55
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tailwindcss",
|
|
3
|
-
"version": "0.0.0-oxide-insiders.
|
|
3
|
+
"version": "0.0.0-oxide-insiders.b2e3cf2",
|
|
4
4
|
"description": "A utility-first CSS framework for rapidly building custom user interfaces.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"dev:rust": "npm run --prefix ./oxide dev:node",
|
|
30
30
|
"dev:js": "npm run build:js -- --watch",
|
|
31
31
|
"build:rust": "npm run --prefix ./oxide build:node",
|
|
32
|
-
"build:js": "npm run generate:plugin-list && swc src --out-dir lib --copy-files --delete-dir-on-start",
|
|
32
|
+
"build:js": "npm run generate:plugin-list && swc src --out-dir lib --copy-files --delete-dir-on-start --config jsc.transform.optimizer.globals.vars.__OXIDE__='\"true\"'",
|
|
33
33
|
"build:peers": "esbuild lib/cli-peer-dependencies.js --bundle --platform=node --outfile=peers/index.js --define:process.env.CSS_TRANSFORMER_WASM=false",
|
|
34
34
|
"generate:plugin-list": "node -r @swc/register scripts/create-plugin-list.js",
|
|
35
35
|
"generate:types": "node -r @swc/register scripts/generate-types.js"
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"postcss": "^8.0.9"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@tailwindcss/oxide": "0.0.0-oxide-insiders.
|
|
73
|
+
"@tailwindcss/oxide": "0.0.0-oxide-insiders.b2e3cf2",
|
|
74
74
|
"arg": "^5.0.2",
|
|
75
75
|
"browserslist": "^4.21.5",
|
|
76
76
|
"chokidar": "^3.5.3",
|
package/peers/index.js
CHANGED
|
@@ -81641,22 +81641,6 @@ var require_src32 = __commonJS({
|
|
|
81641
81641
|
});
|
|
81642
81642
|
|
|
81643
81643
|
// lib/cli-peer-dependencies.js
|
|
81644
|
-
Object.defineProperty(exports, "__esModule", {
|
|
81645
|
-
value: true
|
|
81646
|
-
});
|
|
81647
|
-
function _export(target, all) {
|
|
81648
|
-
for (var name in all)
|
|
81649
|
-
Object.defineProperty(target, name, {
|
|
81650
|
-
enumerable: true,
|
|
81651
|
-
get: all[name]
|
|
81652
|
-
});
|
|
81653
|
-
}
|
|
81654
|
-
_export(exports, {
|
|
81655
|
-
lazyPostcss: () => lazyPostcss,
|
|
81656
|
-
lazyPostcssImport: () => lazyPostcssImport,
|
|
81657
|
-
lazyAutoprefixer: () => lazyAutoprefixer,
|
|
81658
|
-
lazyCssnano: () => lazyCssnano
|
|
81659
|
-
});
|
|
81660
81644
|
function lazyPostcss() {
|
|
81661
81645
|
return require_postcss();
|
|
81662
81646
|
}
|
|
@@ -81669,6 +81653,20 @@ function lazyAutoprefixer() {
|
|
|
81669
81653
|
function lazyCssnano() {
|
|
81670
81654
|
return require_src32();
|
|
81671
81655
|
}
|
|
81656
|
+
Object.defineProperty(exports, "__esModule", {
|
|
81657
|
+
value: true
|
|
81658
|
+
}), function(target, all) {
|
|
81659
|
+
for (var name in all)
|
|
81660
|
+
Object.defineProperty(target, name, {
|
|
81661
|
+
enumerable: true,
|
|
81662
|
+
get: all[name]
|
|
81663
|
+
});
|
|
81664
|
+
}(exports, {
|
|
81665
|
+
lazyPostcss: () => lazyPostcss,
|
|
81666
|
+
lazyPostcssImport: () => lazyPostcssImport,
|
|
81667
|
+
lazyAutoprefixer: () => lazyAutoprefixer,
|
|
81668
|
+
lazyCssnano: () => lazyCssnano
|
|
81669
|
+
});
|
|
81672
81670
|
/*! Bundled license information:
|
|
81673
81671
|
|
|
81674
81672
|
fraction.js/fraction.js:
|
package/src/cli/build/plugin.js
CHANGED
package/src/cli.js
CHANGED
package/src/corePlugins.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import fs from 'fs'
|
|
2
2
|
import * as path from 'path'
|
|
3
3
|
import postcss from 'postcss'
|
|
4
|
-
import { env } from './lib/sharedState'
|
|
5
4
|
import createUtilityPlugin from './util/createUtilityPlugin'
|
|
6
5
|
import buildMediaQuery from './util/buildMediaQuery'
|
|
7
6
|
import escapeClassName from './util/escapeClassName'
|
|
@@ -1262,7 +1261,7 @@ export let corePlugins = {
|
|
|
1262
1261
|
'space-x': (value) => {
|
|
1263
1262
|
value = value === '0' ? '0px' : value
|
|
1264
1263
|
|
|
1265
|
-
if (
|
|
1264
|
+
if (__OXIDE__) {
|
|
1266
1265
|
return {
|
|
1267
1266
|
'& > :not([hidden]) ~ :not([hidden])': {
|
|
1268
1267
|
'--tw-space-x-reverse': '0',
|
|
@@ -1307,7 +1306,7 @@ export let corePlugins = {
|
|
|
1307
1306
|
'divide-x': (value) => {
|
|
1308
1307
|
value = value === '0' ? '0px' : value
|
|
1309
1308
|
|
|
1310
|
-
if (
|
|
1309
|
+
if (__OXIDE__) {
|
|
1311
1310
|
return {
|
|
1312
1311
|
'& > :not([hidden]) ~ :not([hidden])': {
|
|
1313
1312
|
'@defaults border-width': {},
|
|
@@ -1750,7 +1749,13 @@ export let corePlugins = {
|
|
|
1750
1749
|
return withAlphaValue(value, 0, 'rgb(255 255 255 / 0)')
|
|
1751
1750
|
}
|
|
1752
1751
|
|
|
1753
|
-
return function ({ matchUtilities, theme }) {
|
|
1752
|
+
return function ({ matchUtilities, theme, addDefaults }) {
|
|
1753
|
+
addDefaults('gradient-color-stops', {
|
|
1754
|
+
'--tw-gradient-from-position': ' ',
|
|
1755
|
+
'--tw-gradient-via-position': ' ',
|
|
1756
|
+
'--tw-gradient-to-position': ' ',
|
|
1757
|
+
})
|
|
1758
|
+
|
|
1754
1759
|
let options = {
|
|
1755
1760
|
values: flattenColorPalette(theme('gradientColorStops')),
|
|
1756
1761
|
type: ['color', 'any'],
|
|
@@ -1767,13 +1772,9 @@ export let corePlugins = {
|
|
|
1767
1772
|
let transparentToValue = transparentTo(value)
|
|
1768
1773
|
|
|
1769
1774
|
return {
|
|
1770
|
-
'
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
)} var(--tw-gradient-from-position)`,
|
|
1774
|
-
'--tw-gradient-from-position': ' ',
|
|
1775
|
-
'--tw-gradient-to': `${transparentToValue} var(--tw-gradient-from-position)`,
|
|
1776
|
-
'--tw-gradient-to-position': ' ',
|
|
1775
|
+
'@defaults gradient-color-stops': {},
|
|
1776
|
+
'--tw-gradient-from': `${toColorValue(value)} var(--tw-gradient-from-position)`,
|
|
1777
|
+
'--tw-gradient-to': `${transparentToValue} var(--tw-gradient-to-position)`,
|
|
1777
1778
|
'--tw-gradient-stops': `var(--tw-gradient-from), var(--tw-gradient-to)`,
|
|
1778
1779
|
}
|
|
1779
1780
|
},
|
|
@@ -1798,12 +1799,10 @@ export let corePlugins = {
|
|
|
1798
1799
|
let transparentToValue = transparentTo(value)
|
|
1799
1800
|
|
|
1800
1801
|
return {
|
|
1801
|
-
'
|
|
1802
|
+
'@defaults gradient-color-stops': {},
|
|
1802
1803
|
'--tw-gradient-to': `${transparentToValue} var(--tw-gradient-to-position)`,
|
|
1803
|
-
'--tw-gradient-to-position': ' ',
|
|
1804
1804
|
'--tw-gradient-stops': `var(--tw-gradient-from), ${toColorValue(
|
|
1805
|
-
value
|
|
1806
|
-
'via'
|
|
1805
|
+
value
|
|
1807
1806
|
)} var(--tw-gradient-via-position), var(--tw-gradient-to)`,
|
|
1808
1807
|
}
|
|
1809
1808
|
},
|
|
@@ -1825,8 +1824,8 @@ export let corePlugins = {
|
|
|
1825
1824
|
matchUtilities(
|
|
1826
1825
|
{
|
|
1827
1826
|
to: (value) => ({
|
|
1828
|
-
'
|
|
1829
|
-
'--tw-gradient-to
|
|
1827
|
+
'@defaults gradient-color-stops': {},
|
|
1828
|
+
'--tw-gradient-to': `${toColorValue(value)} var(--tw-gradient-to-position)`,
|
|
1830
1829
|
}),
|
|
1831
1830
|
},
|
|
1832
1831
|
options
|
package/src/featureFlags.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import colors from 'picocolors'
|
|
2
2
|
import log from './util/log'
|
|
3
|
-
import { env } from './lib/sharedState'
|
|
4
3
|
|
|
5
4
|
let defaults = {
|
|
6
5
|
optimizeUniversalDefaults: false,
|
|
7
6
|
generalizedModifiers: true,
|
|
8
7
|
get disableColorOpacityUtilitiesByDefault() {
|
|
9
|
-
return
|
|
8
|
+
return __OXIDE__
|
|
10
9
|
},
|
|
11
10
|
get relativeContentPathsByDefault() {
|
|
12
|
-
return
|
|
11
|
+
return __OXIDE__
|
|
13
12
|
},
|
|
14
13
|
}
|
|
15
14
|
|
package/src/index.js
CHANGED
|
@@ -130,7 +130,7 @@ export default function expandTailwindAtRules(context) {
|
|
|
130
130
|
|
|
131
131
|
env.DEBUG && console.time('Reading changed files')
|
|
132
132
|
|
|
133
|
-
if (
|
|
133
|
+
if (__OXIDE__) {
|
|
134
134
|
// TODO: Pass through or implement `extractor`
|
|
135
135
|
for (let candidate of require('@tailwindcss/oxide').parseCandidateStringsFromFiles(
|
|
136
136
|
context.changedContent
|
|
@@ -162,7 +162,7 @@ export default function expandTailwindAtRules(context) {
|
|
|
162
162
|
|
|
163
163
|
env.DEBUG && console.time('Generate rules')
|
|
164
164
|
env.DEBUG && console.time('Sorting candidates')
|
|
165
|
-
let sortedCandidates =
|
|
165
|
+
let sortedCandidates = __OXIDE__
|
|
166
166
|
? candidates
|
|
167
167
|
: new Set(
|
|
168
168
|
[...candidates].sort((a, z) => {
|
package/src/lib/sharedState.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import pkg from '../../package.json'
|
|
2
|
-
let OXIDE_DEFAULT_ENABLED = pkg.tailwindcss.engine === 'oxide'
|
|
3
2
|
|
|
4
3
|
export const env =
|
|
5
4
|
typeof process !== 'undefined'
|
|
@@ -7,13 +6,11 @@ export const env =
|
|
|
7
6
|
NODE_ENV: process.env.NODE_ENV,
|
|
8
7
|
DEBUG: resolveDebug(process.env.DEBUG),
|
|
9
8
|
ENGINE: pkg.tailwindcss.engine,
|
|
10
|
-
OXIDE: resolveBoolean(process.env.OXIDE, OXIDE_DEFAULT_ENABLED),
|
|
11
9
|
}
|
|
12
10
|
: {
|
|
13
11
|
NODE_ENV: 'production',
|
|
14
12
|
DEBUG: false,
|
|
15
13
|
ENGINE: pkg.tailwindcss.engine,
|
|
16
|
-
OXIDE: OXIDE_DEFAULT_ENABLED,
|
|
17
14
|
}
|
|
18
15
|
|
|
19
16
|
export const contextMap = new Map()
|
|
@@ -24,18 +21,6 @@ export const NOT_ON_DEMAND = new String('*')
|
|
|
24
21
|
|
|
25
22
|
export const NONE = Symbol('__NONE__')
|
|
26
23
|
|
|
27
|
-
function resolveBoolean(value, defaultValue) {
|
|
28
|
-
if (value === undefined) {
|
|
29
|
-
return defaultValue
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
if (value === '0' || value === 'false') {
|
|
33
|
-
return false
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return true
|
|
37
|
-
}
|
|
38
|
-
|
|
39
24
|
export function resolveDebug(debug) {
|
|
40
25
|
if (debug === undefined) {
|
|
41
26
|
return false
|
package/src/plugin.js
CHANGED
|
@@ -34,7 +34,7 @@ module.exports = function tailwindcss(configOrPath) {
|
|
|
34
34
|
|
|
35
35
|
processTailwindFeatures(context)(root, result)
|
|
36
36
|
},
|
|
37
|
-
|
|
37
|
+
__OXIDE__ &&
|
|
38
38
|
function lightningCssPlugin(_root, result) {
|
|
39
39
|
let postcss = require('postcss')
|
|
40
40
|
let lightningcss = require('lightningcss')
|