tailwindcss 0.0.0-insiders.df011dc → 0.0.0-insiders.e2d5f21
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 +106 -1
- package/README.md +1 -1
- package/colors.js +1 -304
- package/defaultConfig.js +1 -4
- package/defaultTheme.js +1 -4
- package/lib/cli-peer-dependencies.js +4 -9
- package/lib/cli.js +646 -705
- package/lib/constants.js +15 -15
- package/lib/corePluginList.js +174 -4
- package/lib/corePlugins.js +3637 -2934
- package/lib/css/preflight.css +14 -1
- package/lib/featureFlags.js +44 -44
- package/lib/index.js +25 -24
- package/lib/lib/collapseAdjacentRules.js +33 -35
- package/lib/lib/collapseDuplicateDeclarations.js +29 -0
- package/lib/lib/detectNesting.js +34 -0
- package/lib/lib/evaluateTailwindFunctions.js +134 -155
- package/lib/lib/expandApplyAtRules.js +183 -200
- package/lib/lib/expandTailwindAtRules.js +219 -232
- package/lib/lib/generateRules.js +478 -311
- package/lib/lib/getModuleDependencies.js +36 -41
- package/lib/lib/normalizeTailwindDirectives.js +66 -58
- package/lib/lib/resolveDefaultsAtRules.js +110 -90
- package/lib/lib/setupContextUtils.js +740 -580
- package/lib/lib/setupTrackingContext.js +142 -162
- package/lib/lib/setupWatchingContext.js +235 -278
- package/lib/lib/sharedState.js +7 -17
- package/lib/lib/substituteScreenAtRules.js +22 -26
- package/lib/processTailwindFeatures.js +38 -44
- package/lib/public/colors.js +329 -0
- package/lib/public/create-plugin.js +13 -0
- package/lib/public/default-config.js +14 -0
- package/lib/public/default-theme.js +14 -0
- package/lib/public/resolve-config.js +19 -0
- package/lib/util/bigSign.js +3 -5
- package/lib/util/buildMediaQuery.js +15 -31
- package/lib/util/cloneDeep.js +14 -13
- package/lib/util/cloneNodes.js +9 -13
- package/lib/util/color.js +69 -59
- package/lib/util/configurePlugins.js +13 -14
- package/lib/util/createPlugin.js +21 -24
- package/lib/util/createUtilityPlugin.js +47 -45
- package/lib/util/dataTypes.js +231 -0
- package/lib/util/defaults.js +10 -14
- package/lib/util/escapeClassName.js +12 -14
- package/lib/util/escapeCommas.js +3 -5
- package/lib/util/flattenColorPalette.js +14 -10
- package/lib/util/formatVariantSelector.js +186 -0
- package/lib/util/getAllConfigs.js +23 -16
- package/lib/util/hashConfig.js +10 -10
- package/lib/util/isKeyframeRule.js +3 -5
- package/lib/util/isPlainObject.js +7 -10
- package/lib/util/isValidArbitraryValue.js +64 -0
- package/lib/util/log.js +39 -30
- package/lib/util/nameClass.js +23 -23
- package/lib/util/negateValue.js +14 -15
- package/lib/util/normalizeConfig.js +208 -0
- package/lib/util/normalizeScreens.js +58 -0
- package/lib/util/parseAnimationValue.js +82 -53
- package/lib/util/parseBoxShadowValue.js +77 -0
- package/lib/util/parseDependency.js +49 -60
- package/lib/util/parseObjectStyles.js +23 -20
- package/lib/util/pluginUtils.js +153 -285
- package/lib/util/prefixSelector.js +14 -16
- package/lib/util/resolveConfig.js +194 -249
- package/lib/util/resolveConfigPath.js +38 -45
- package/lib/util/responsive.js +12 -11
- package/lib/util/tap.js +4 -6
- package/lib/util/toColorValue.js +4 -5
- package/lib/util/toPath.js +4 -6
- package/lib/util/transformThemeValue.js +57 -26
- package/lib/util/withAlphaVariable.js +56 -54
- package/package.json +27 -37
- package/peers/index.js +73099 -84294
- package/plugin.js +1 -3
- package/resolveConfig.js +1 -7
- package/scripts/create-plugin-list.js +2 -2
- package/src/cli.js +27 -18
- package/src/corePluginList.js +1 -1
- package/src/corePlugins.js +2124 -1968
- package/src/css/preflight.css +14 -1
- package/src/featureFlags.js +12 -6
- package/src/lib/collapseDuplicateDeclarations.js +28 -0
- package/src/lib/detectNesting.js +39 -0
- package/src/lib/evaluateTailwindFunctions.js +5 -2
- package/src/lib/expandTailwindAtRules.js +24 -32
- package/src/lib/generateRules.js +230 -20
- package/src/lib/normalizeTailwindDirectives.js +3 -2
- package/src/lib/resolveDefaultsAtRules.js +46 -30
- package/src/lib/setupContextUtils.js +275 -113
- package/src/lib/setupTrackingContext.js +9 -8
- package/src/lib/setupWatchingContext.js +12 -7
- package/src/lib/sharedState.js +1 -4
- package/src/lib/substituteScreenAtRules.js +6 -3
- package/src/processTailwindFeatures.js +8 -1
- package/src/public/colors.js +300 -0
- package/src/public/create-plugin.js +2 -0
- package/src/public/default-config.js +4 -0
- package/src/public/default-theme.js +4 -0
- package/src/public/resolve-config.js +7 -0
- package/src/util/buildMediaQuery.js +14 -18
- package/src/util/createUtilityPlugin.js +2 -11
- package/src/util/dataTypes.js +246 -0
- package/src/util/formatVariantSelector.js +196 -0
- package/src/util/isValidArbitraryValue.js +61 -0
- package/src/util/log.js +18 -21
- package/src/util/nameClass.js +10 -6
- package/src/util/negateValue.js +4 -2
- package/src/util/normalizeConfig.js +249 -0
- package/src/util/normalizeScreens.js +42 -0
- package/src/util/parseAnimationValue.js +7 -1
- package/src/util/parseBoxShadowValue.js +71 -0
- package/src/util/parseDependency.js +4 -0
- package/src/util/pluginUtils.js +101 -204
- package/src/util/prefixSelector.js +1 -4
- package/src/util/resolveConfig.js +12 -65
- package/src/util/transformThemeValue.js +22 -7
- package/src/util/withAlphaVariable.js +13 -8
- package/stubs/defaultConfig.stub.js +163 -97
- package/stubs/simpleConfig.stub.js +0 -1
|
@@ -1,53 +1,48 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
2
|
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
|
|
3
|
+
value: true
|
|
5
4
|
});
|
|
6
5
|
exports.default = getModuleDependencies;
|
|
7
|
-
|
|
8
6
|
var _fs = _interopRequireDefault(require("fs"));
|
|
9
|
-
|
|
10
7
|
var _path = _interopRequireDefault(require("path"));
|
|
11
|
-
|
|
12
8
|
var _resolve = _interopRequireDefault(require("resolve"));
|
|
13
|
-
|
|
14
9
|
var _detective = _interopRequireDefault(require("detective"));
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
function _interopRequireDefault(obj) {
|
|
11
|
+
return obj && obj.__esModule ? obj : {
|
|
12
|
+
default: obj
|
|
13
|
+
};
|
|
14
|
+
}
|
|
18
15
|
function createModule(file) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
};
|
|
16
|
+
const source = _fs.default.readFileSync(file, 'utf-8');
|
|
17
|
+
const requires = (0, _detective).default(source);
|
|
18
|
+
return {
|
|
19
|
+
file,
|
|
20
|
+
requires
|
|
21
|
+
};
|
|
26
22
|
}
|
|
27
|
-
|
|
28
23
|
function getModuleDependencies(entryFile) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
24
|
+
const rootModule = createModule(entryFile);
|
|
25
|
+
const modules = [
|
|
26
|
+
rootModule
|
|
27
|
+
];
|
|
28
|
+
// Iterate over the modules, even when new
|
|
29
|
+
// ones are being added
|
|
30
|
+
for (const mdl of modules){
|
|
31
|
+
mdl.requires.filter((dep)=>{
|
|
32
|
+
// Only track local modules, not node_modules
|
|
33
|
+
return dep.startsWith('./') || dep.startsWith('../');
|
|
34
|
+
}).forEach((dep)=>{
|
|
35
|
+
try {
|
|
36
|
+
const basedir = _path.default.dirname(mdl.file);
|
|
37
|
+
const depPath = _resolve.default.sync(dep, {
|
|
38
|
+
basedir
|
|
39
|
+
});
|
|
40
|
+
const depModule = createModule(depPath);
|
|
41
|
+
modules.push(depModule);
|
|
42
|
+
} catch (_err) {
|
|
43
|
+
// eslint-disable-next-line no-empty
|
|
44
|
+
}
|
|
43
45
|
});
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
} catch (_err) {// eslint-disable-next-line no-empty
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
return modules;
|
|
53
|
-
}
|
|
46
|
+
}
|
|
47
|
+
return modules;
|
|
48
|
+
}
|
|
@@ -1,68 +1,76 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
2
|
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
|
|
3
|
+
value: true
|
|
5
4
|
});
|
|
6
5
|
exports.default = normalizeTailwindDirectives;
|
|
7
|
-
|
|
8
6
|
var _log = _interopRequireDefault(require("../util/log"));
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
function _interopRequireDefault(obj) {
|
|
8
|
+
return obj && obj.__esModule ? obj : {
|
|
9
|
+
default: obj
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
12
|
function normalizeTailwindDirectives(root) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
tailwindDirectives.add(atRule.params);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
if (['layer', 'responsive', 'variants'].includes(atRule.name)) {
|
|
41
|
-
if (['responsive', 'variants'].includes(atRule.name)) {
|
|
42
|
-
_log.default.warn([`'@${atRule.name}' is deprecated, use '@layer utilities' or '@layer components' instead.`]);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
layerDirectives.add(atRule);
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
if (!tailwindDirectives.has('base') || !tailwindDirectives.has('components') || !tailwindDirectives.has('utilities')) {
|
|
50
|
-
for (let rule of layerDirectives) {
|
|
51
|
-
if (rule.name === 'layer' && ['base', 'components', 'utilities'].includes(rule.params)) {
|
|
52
|
-
if (!tailwindDirectives.has(rule.params)) {
|
|
53
|
-
throw rule.error(`\`@layer ${rule.params}\` is used but no matching \`@tailwind ${rule.params}\` directive is present.`);
|
|
13
|
+
let tailwindDirectives = new Set();
|
|
14
|
+
let layerDirectives = new Set();
|
|
15
|
+
root.walkAtRules((atRule)=>{
|
|
16
|
+
if (atRule.name === 'import') {
|
|
17
|
+
if (atRule.params === '"tailwindcss/base"' || atRule.params === "'tailwindcss/base'") {
|
|
18
|
+
atRule.name = 'tailwind';
|
|
19
|
+
atRule.params = 'base';
|
|
20
|
+
} else if (atRule.params === '"tailwindcss/components"' || atRule.params === "'tailwindcss/components'") {
|
|
21
|
+
atRule.name = 'tailwind';
|
|
22
|
+
atRule.params = 'components';
|
|
23
|
+
} else if (atRule.params === '"tailwindcss/utilities"' || atRule.params === "'tailwindcss/utilities'") {
|
|
24
|
+
atRule.name = 'tailwind';
|
|
25
|
+
atRule.params = 'utilities';
|
|
26
|
+
} else if (atRule.params === '"tailwindcss/screens"' || atRule.params === "'tailwindcss/screens'" || atRule.params === '"tailwindcss/variants"' || atRule.params === "'tailwindcss/variants'") {
|
|
27
|
+
atRule.name = 'tailwind';
|
|
28
|
+
atRule.params = 'variants';
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
if (atRule.name === 'tailwind') {
|
|
32
|
+
if (atRule.params === 'screens') {
|
|
33
|
+
atRule.params = 'variants';
|
|
34
|
+
}
|
|
35
|
+
tailwindDirectives.add(atRule.params);
|
|
54
36
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
37
|
+
if ([
|
|
38
|
+
'layer',
|
|
39
|
+
'responsive',
|
|
40
|
+
'variants'
|
|
41
|
+
].includes(atRule.name)) {
|
|
42
|
+
if ([
|
|
43
|
+
'responsive',
|
|
44
|
+
'variants'
|
|
45
|
+
].includes(atRule.name)) {
|
|
46
|
+
_log.default.warn(`${atRule.name}-at-rule-deprecated`, [
|
|
47
|
+
`The \`@${atRule.name}\` directive has been deprecated in Tailwind CSS v3.0.`,
|
|
48
|
+
`Use \`@layer utilities\` or \`@layer components\` instead.`,
|
|
49
|
+
]);
|
|
50
|
+
}
|
|
51
|
+
layerDirectives.add(atRule);
|
|
58
52
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
53
|
+
});
|
|
54
|
+
if (!tailwindDirectives.has('base') || !tailwindDirectives.has('components') || !tailwindDirectives.has('utilities')) {
|
|
55
|
+
for (let rule of layerDirectives){
|
|
56
|
+
if (rule.name === 'layer' && [
|
|
57
|
+
'base',
|
|
58
|
+
'components',
|
|
59
|
+
'utilities'
|
|
60
|
+
].includes(rule.params)) {
|
|
61
|
+
if (!tailwindDirectives.has(rule.params)) {
|
|
62
|
+
throw rule.error(`\`@layer ${rule.params}\` is used but no matching \`@tailwind ${rule.params}\` directive is present.`);
|
|
63
|
+
}
|
|
64
|
+
} else if (rule.name === 'responsive') {
|
|
65
|
+
if (!tailwindDirectives.has('utilities')) {
|
|
66
|
+
throw rule.error('`@responsive` is used but `@tailwind utilities` is missing.');
|
|
67
|
+
}
|
|
68
|
+
} else if (rule.name === 'variants') {
|
|
69
|
+
if (!tailwindDirectives.has('utilities')) {
|
|
70
|
+
throw rule.error('`@variants` is used but `@tailwind utilities` is missing.');
|
|
71
|
+
}
|
|
72
|
+
}
|
|
62
73
|
}
|
|
63
|
-
}
|
|
64
74
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
return tailwindDirectives;
|
|
68
|
-
}
|
|
75
|
+
return tailwindDirectives;
|
|
76
|
+
}
|
|
@@ -1,105 +1,125 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
2
|
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
|
|
3
|
+
value: true
|
|
5
4
|
});
|
|
6
5
|
exports.default = resolveDefaultsAtRules;
|
|
7
|
-
|
|
6
|
+
exports.elementSelectorParser = void 0;
|
|
8
7
|
var _postcss = _interopRequireDefault(require("postcss"));
|
|
9
|
-
|
|
10
8
|
var _postcssSelectorParser = _interopRequireDefault(require("postcss-selector-parser"));
|
|
11
|
-
|
|
12
9
|
var _featureFlags = require("../featureFlags");
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
function _interopRequireDefault(obj) {
|
|
11
|
+
return obj && obj.__esModule ? obj : {
|
|
12
|
+
default: obj
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
let getNode = {
|
|
16
|
+
id (node) {
|
|
17
|
+
return _postcssSelectorParser.default.attribute({
|
|
18
|
+
attribute: 'id',
|
|
19
|
+
operator: '=',
|
|
20
|
+
value: node.value,
|
|
21
|
+
quoteMark: '"'
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
};
|
|
16
25
|
function minimumImpactSelector(nodes) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
let rest = nodes.filter((node)=>{
|
|
27
|
+
// Keep non-pseudo nodes
|
|
28
|
+
if (node.type !== 'pseudo') return true;
|
|
29
|
+
// Keep pseudo nodes that have subnodes
|
|
30
|
+
// E.g.: `:not()` contains subnodes inside the parentheses
|
|
31
|
+
if (node.nodes.length > 0) return true;
|
|
32
|
+
// Keep pseudo `elements`
|
|
33
|
+
// This implicitly means that we ignore pseudo `classes`
|
|
34
|
+
return node.value.startsWith('::') || [
|
|
35
|
+
':before',
|
|
36
|
+
':after',
|
|
37
|
+
':first-line',
|
|
38
|
+
':first-letter'
|
|
39
|
+
].includes(node.value);
|
|
40
|
+
}).reverse();
|
|
41
|
+
let searchFor = new Set([
|
|
42
|
+
'tag',
|
|
43
|
+
'class',
|
|
44
|
+
'id',
|
|
45
|
+
'attribute'
|
|
46
|
+
]);
|
|
47
|
+
let splitPointIdx = rest.findIndex((n)=>searchFor.has(n.type)
|
|
48
|
+
);
|
|
49
|
+
if (splitPointIdx === -1) return rest.reverse().join('').trim();
|
|
50
|
+
let node1 = rest[splitPointIdx];
|
|
51
|
+
let bestNode = getNode[node1.type] ? getNode[node1.type](node1) : node1;
|
|
52
|
+
rest = rest.slice(0, splitPointIdx);
|
|
53
|
+
let combinatorIdx = rest.findIndex((n)=>n.type === 'combinator' && n.value === '>'
|
|
54
|
+
);
|
|
55
|
+
if (combinatorIdx !== -1) {
|
|
56
|
+
rest.splice(0, combinatorIdx);
|
|
57
|
+
rest.unshift(_postcssSelectorParser.default.universal());
|
|
31
58
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
59
|
+
return [
|
|
60
|
+
bestNode,
|
|
61
|
+
...rest.reverse()
|
|
62
|
+
].join('').trim();
|
|
35
63
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
64
|
+
let elementSelectorParser = (0, _postcssSelectorParser).default((selectors)=>{
|
|
65
|
+
return selectors.map((s)=>{
|
|
66
|
+
let nodes = s.split((n)=>n.type === 'combinator' && n.value === ' '
|
|
67
|
+
).pop();
|
|
68
|
+
return minimumImpactSelector(nodes);
|
|
69
|
+
});
|
|
42
70
|
});
|
|
71
|
+
exports.elementSelectorParser = elementSelectorParser;
|
|
43
72
|
let cache = new Map();
|
|
44
|
-
|
|
45
73
|
function extractElementSelector(selector) {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return cache.get(selector);
|
|
74
|
+
if (!cache.has(selector)) {
|
|
75
|
+
cache.set(selector, elementSelectorParser.transformSync(selector));
|
|
76
|
+
}
|
|
77
|
+
return cache.get(selector);
|
|
51
78
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
79
|
+
function resolveDefaultsAtRules({ tailwindConfig }) {
|
|
80
|
+
return (root)=>{
|
|
81
|
+
let variableNodeMap = new Map();
|
|
82
|
+
let universals = new Set();
|
|
83
|
+
root.walkAtRules('defaults', (rule)=>{
|
|
84
|
+
if (rule.nodes && rule.nodes.length > 0) {
|
|
85
|
+
universals.add(rule);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
let variable = rule.params;
|
|
89
|
+
if (!variableNodeMap.has(variable)) {
|
|
90
|
+
variableNodeMap.set(variable, new Set());
|
|
91
|
+
}
|
|
92
|
+
variableNodeMap.get(variable).add(rule.parent);
|
|
93
|
+
rule.remove();
|
|
94
|
+
});
|
|
95
|
+
for (let universal of universals){
|
|
96
|
+
let selectors = new Set();
|
|
97
|
+
var ref;
|
|
98
|
+
let rules = (ref = variableNodeMap.get(universal.params)) !== null && ref !== void 0 ? ref : [];
|
|
99
|
+
for (let rule of rules){
|
|
100
|
+
for (let selector of extractElementSelector(rule.selector)){
|
|
101
|
+
selectors.add(selector);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
if (selectors.size === 0) {
|
|
105
|
+
universal.remove();
|
|
106
|
+
continue;
|
|
107
|
+
}
|
|
108
|
+
let universalRule = _postcss.default.rule();
|
|
109
|
+
if ((0, _featureFlags).flagEnabled(tailwindConfig, 'optimizeUniversalDefaults')) {
|
|
110
|
+
universalRule.selectors = [
|
|
111
|
+
...selectors
|
|
112
|
+
];
|
|
113
|
+
} else {
|
|
114
|
+
universalRule.selectors = [
|
|
115
|
+
'*',
|
|
116
|
+
'::before',
|
|
117
|
+
'::after'
|
|
118
|
+
];
|
|
119
|
+
}
|
|
120
|
+
universalRule.append(universal.nodes);
|
|
121
|
+
universal.before(universalRule);
|
|
122
|
+
universal.remove();
|
|
84
123
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
if (selectors.size === 0) {
|
|
88
|
-
universal.remove();
|
|
89
|
-
continue;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
let universalRule = _postcss.default.rule();
|
|
93
|
-
|
|
94
|
-
if ((0, _featureFlags.flagEnabled)(tailwindConfig, 'optimizeUniversalDefaults')) {
|
|
95
|
-
universalRule.selectors = [...selectors];
|
|
96
|
-
} else {
|
|
97
|
-
universalRule.selectors = ['*', '::before', '::after'];
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
universalRule.append(universal.nodes);
|
|
101
|
-
universal.before(universalRule);
|
|
102
|
-
universal.remove();
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
}
|
|
124
|
+
};
|
|
125
|
+
}
|