tailwindcss 3.4.1 → 4.0.0-alpha.2
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/README.md +5 -6
- package/dist/lib.d.mts +324 -0
- package/dist/lib.d.ts +324 -0
- package/dist/lib.js +11 -0
- package/dist/lib.mjs +11 -0
- package/index.css +5 -0
- package/package.json +29 -107
- package/preflight.css +355 -0
- package/theme.css +465 -0
- package/CHANGELOG.md +0 -2571
- package/base.css +0 -1
- package/colors.d.ts +0 -3
- package/colors.js +0 -2
- package/components.css +0 -1
- package/defaultConfig.d.ts +0 -3
- package/defaultConfig.js +0 -2
- package/defaultTheme.d.ts +0 -4
- package/defaultTheme.js +0 -2
- package/lib/cli/build/deps.js +0 -62
- package/lib/cli/build/index.js +0 -54
- package/lib/cli/build/plugin.js +0 -378
- package/lib/cli/build/utils.js +0 -88
- package/lib/cli/build/watching.js +0 -182
- package/lib/cli/help/index.js +0 -73
- package/lib/cli/index.js +0 -230
- package/lib/cli/init/index.js +0 -63
- package/lib/cli-peer-dependencies.js +0 -36
- package/lib/cli.js +0 -7
- package/lib/corePluginList.js +0 -190
- package/lib/corePlugins.js +0 -4282
- package/lib/css/LICENSE +0 -25
- package/lib/css/preflight.css +0 -385
- package/lib/featureFlags.js +0 -83
- package/lib/index.js +0 -2
- package/lib/lib/cacheInvalidation.js +0 -92
- package/lib/lib/collapseAdjacentRules.js +0 -61
- package/lib/lib/collapseDuplicateDeclarations.js +0 -85
- package/lib/lib/content.js +0 -181
- package/lib/lib/defaultExtractor.js +0 -251
- package/lib/lib/detectNesting.js +0 -45
- package/lib/lib/evaluateTailwindFunctions.js +0 -238
- package/lib/lib/expandApplyAtRules.js +0 -540
- package/lib/lib/expandTailwindAtRules.js +0 -291
- package/lib/lib/findAtConfigPath.js +0 -46
- package/lib/lib/generateRules.js +0 -904
- package/lib/lib/getModuleDependencies.js +0 -99
- package/lib/lib/load-config.js +0 -53
- package/lib/lib/normalizeTailwindDirectives.js +0 -89
- package/lib/lib/offsets.js +0 -306
- package/lib/lib/partitionApplyAtRules.js +0 -58
- package/lib/lib/regex.js +0 -74
- package/lib/lib/remap-bitfield.js +0 -89
- package/lib/lib/resolveDefaultsAtRules.js +0 -165
- package/lib/lib/setupContextUtils.js +0 -1294
- package/lib/lib/setupTrackingContext.js +0 -166
- package/lib/lib/sharedState.js +0 -87
- package/lib/lib/substituteScreenAtRules.js +0 -31
- package/lib/oxide/cli/build/deps.js +0 -89
- package/lib/oxide/cli/build/index.js +0 -53
- package/lib/oxide/cli/build/plugin.js +0 -375
- package/lib/oxide/cli/build/utils.js +0 -87
- package/lib/oxide/cli/build/watching.js +0 -179
- package/lib/oxide/cli/help/index.js +0 -72
- package/lib/oxide/cli/index.js +0 -214
- package/lib/oxide/cli/init/index.js +0 -52
- package/lib/oxide/cli.js +0 -5
- package/lib/oxide/postcss-plugin.js +0 -2
- package/lib/plugin.js +0 -98
- package/lib/postcss-plugins/nesting/README.md +0 -42
- package/lib/postcss-plugins/nesting/index.js +0 -21
- package/lib/postcss-plugins/nesting/plugin.js +0 -89
- package/lib/processTailwindFeatures.js +0 -64
- package/lib/public/colors.js +0 -355
- package/lib/public/create-plugin.js +0 -17
- package/lib/public/default-config.js +0 -18
- package/lib/public/default-theme.js +0 -18
- package/lib/public/load-config.js +0 -12
- package/lib/public/resolve-config.js +0 -24
- package/lib/util/applyImportantSelector.js +0 -36
- package/lib/util/bigSign.js +0 -13
- package/lib/util/buildMediaQuery.js +0 -27
- package/lib/util/cloneDeep.js +0 -22
- package/lib/util/cloneNodes.js +0 -54
- package/lib/util/color.js +0 -116
- package/lib/util/colorNames.js +0 -752
- package/lib/util/configurePlugins.js +0 -23
- package/lib/util/createPlugin.js +0 -32
- package/lib/util/createUtilityPlugin.js +0 -53
- package/lib/util/dataTypes.js +0 -415
- package/lib/util/defaults.js +0 -27
- package/lib/util/escapeClassName.js +0 -24
- package/lib/util/escapeCommas.js +0 -13
- package/lib/util/flattenColorPalette.js +0 -18
- package/lib/util/formatVariantSelector.js +0 -270
- package/lib/util/getAllConfigs.js +0 -50
- package/lib/util/hashConfig.js +0 -21
- package/lib/util/isKeyframeRule.js +0 -13
- package/lib/util/isPlainObject.js +0 -17
- package/lib/util/isSyntacticallyValidPropertyValue.js +0 -74
- package/lib/util/log.js +0 -61
- package/lib/util/nameClass.js +0 -49
- package/lib/util/negateValue.js +0 -36
- package/lib/util/normalizeConfig.js +0 -282
- package/lib/util/normalizeScreens.js +0 -178
- package/lib/util/parseAnimationValue.js +0 -93
- package/lib/util/parseBoxShadowValue.js +0 -88
- package/lib/util/parseDependency.js +0 -47
- package/lib/util/parseGlob.js +0 -36
- package/lib/util/parseObjectStyles.js +0 -36
- package/lib/util/pluginUtils.js +0 -289
- package/lib/util/prefixSelector.js +0 -39
- package/lib/util/pseudoElements.js +0 -212
- package/lib/util/removeAlphaVariables.js +0 -31
- package/lib/util/resolveConfig.js +0 -256
- package/lib/util/resolveConfigPath.js +0 -70
- package/lib/util/responsive.js +0 -24
- package/lib/util/splitAtTopLevelOnly.js +0 -51
- package/lib/util/tap.js +0 -14
- package/lib/util/toColorValue.js +0 -13
- package/lib/util/toPath.js +0 -32
- package/lib/util/transformThemeValue.js +0 -73
- package/lib/util/validateConfig.js +0 -37
- package/lib/util/validateFormalSyntax.js +0 -26
- package/lib/util/withAlphaVariable.js +0 -79
- package/lib/value-parser/LICENSE +0 -22
- package/lib/value-parser/README.md +0 -3
- package/lib/value-parser/index.d.js +0 -2
- package/lib/value-parser/index.js +0 -22
- package/lib/value-parser/parse.js +0 -259
- package/lib/value-parser/stringify.js +0 -38
- package/lib/value-parser/unit.js +0 -86
- package/lib/value-parser/walk.js +0 -16
- package/loadConfig.d.ts +0 -4
- package/loadConfig.js +0 -2
- package/nesting/index.d.ts +0 -4
- package/nesting/index.js +0 -2
- package/peers/index.js +0 -96624
- package/plugin.d.ts +0 -11
- package/plugin.js +0 -2
- package/prettier.config.js +0 -19
- package/resolveConfig.d.ts +0 -31
- package/resolveConfig.js +0 -2
- package/screens.css +0 -1
- package/scripts/create-plugin-list.js +0 -10
- package/scripts/generate-types.js +0 -104
- package/scripts/release-channel.js +0 -18
- package/scripts/release-notes.js +0 -21
- package/scripts/swap-engines.js +0 -40
- package/scripts/type-utils.js +0 -27
- package/src/cli/build/deps.js +0 -56
- package/src/cli/build/index.js +0 -49
- package/src/cli/build/plugin.js +0 -444
- package/src/cli/build/utils.js +0 -76
- package/src/cli/build/watching.js +0 -229
- package/src/cli/help/index.js +0 -70
- package/src/cli/index.js +0 -216
- package/src/cli/init/index.js +0 -79
- package/src/cli-peer-dependencies.js +0 -15
- package/src/cli.js +0 -7
- package/src/corePluginList.js +0 -1
- package/src/corePlugins.js +0 -2943
- package/src/css/LICENSE +0 -25
- package/src/css/preflight.css +0 -385
- package/src/featureFlags.js +0 -66
- package/src/index.js +0 -1
- package/src/lib/cacheInvalidation.js +0 -52
- package/src/lib/collapseAdjacentRules.js +0 -58
- package/src/lib/collapseDuplicateDeclarations.js +0 -93
- package/src/lib/content.js +0 -208
- package/src/lib/defaultExtractor.js +0 -230
- package/src/lib/detectNesting.js +0 -47
- package/src/lib/evaluateTailwindFunctions.js +0 -272
- package/src/lib/expandApplyAtRules.js +0 -620
- package/src/lib/expandTailwindAtRules.js +0 -300
- package/src/lib/findAtConfigPath.js +0 -48
- package/src/lib/generateRules.js +0 -951
- package/src/lib/getModuleDependencies.js +0 -79
- package/src/lib/load-config.ts +0 -39
- package/src/lib/normalizeTailwindDirectives.js +0 -84
- package/src/lib/offsets.js +0 -373
- package/src/lib/partitionApplyAtRules.js +0 -52
- package/src/lib/regex.js +0 -74
- package/src/lib/remap-bitfield.js +0 -82
- package/src/lib/resolveDefaultsAtRules.js +0 -163
- package/src/lib/setupContextUtils.js +0 -1366
- package/src/lib/setupTrackingContext.js +0 -169
- package/src/lib/sharedState.js +0 -61
- package/src/lib/substituteScreenAtRules.js +0 -19
- package/src/oxide/cli/build/deps.ts +0 -91
- package/src/oxide/cli/build/index.ts +0 -47
- package/src/oxide/cli/build/plugin.ts +0 -442
- package/src/oxide/cli/build/utils.ts +0 -74
- package/src/oxide/cli/build/watching.ts +0 -225
- package/src/oxide/cli/help/index.ts +0 -69
- package/src/oxide/cli/index.ts +0 -204
- package/src/oxide/cli/init/index.ts +0 -59
- package/src/oxide/cli.ts +0 -1
- package/src/oxide/postcss-plugin.ts +0 -1
- package/src/plugin.js +0 -107
- package/src/postcss-plugins/nesting/README.md +0 -42
- package/src/postcss-plugins/nesting/index.js +0 -13
- package/src/postcss-plugins/nesting/plugin.js +0 -80
- package/src/processTailwindFeatures.js +0 -59
- package/src/public/colors.js +0 -322
- package/src/public/create-plugin.js +0 -2
- package/src/public/default-config.js +0 -4
- package/src/public/default-theme.js +0 -4
- package/src/public/load-config.js +0 -2
- package/src/public/resolve-config.js +0 -7
- package/src/util/applyImportantSelector.js +0 -27
- package/src/util/bigSign.js +0 -3
- package/src/util/buildMediaQuery.js +0 -22
- package/src/util/cloneDeep.js +0 -11
- package/src/util/cloneNodes.js +0 -49
- package/src/util/color.js +0 -88
- package/src/util/colorNames.js +0 -150
- package/src/util/configurePlugins.js +0 -23
- package/src/util/createPlugin.js +0 -27
- package/src/util/createUtilityPlugin.js +0 -37
- package/src/util/dataTypes.js +0 -406
- package/src/util/defaults.js +0 -17
- package/src/util/escapeClassName.js +0 -8
- package/src/util/escapeCommas.js +0 -3
- package/src/util/flattenColorPalette.js +0 -13
- package/src/util/formatVariantSelector.js +0 -324
- package/src/util/getAllConfigs.js +0 -38
- package/src/util/hashConfig.js +0 -5
- package/src/util/isKeyframeRule.js +0 -3
- package/src/util/isPlainObject.js +0 -8
- package/src/util/isSyntacticallyValidPropertyValue.js +0 -61
- package/src/util/log.js +0 -29
- package/src/util/nameClass.js +0 -30
- package/src/util/negateValue.js +0 -24
- package/src/util/normalizeConfig.js +0 -301
- package/src/util/normalizeScreens.js +0 -140
- package/src/util/parseAnimationValue.js +0 -68
- package/src/util/parseBoxShadowValue.js +0 -72
- package/src/util/parseDependency.js +0 -44
- package/src/util/parseGlob.js +0 -24
- package/src/util/parseObjectStyles.js +0 -19
- package/src/util/pluginUtils.js +0 -307
- package/src/util/prefixSelector.js +0 -33
- package/src/util/pseudoElements.js +0 -171
- package/src/util/removeAlphaVariables.js +0 -24
- package/src/util/resolveConfig.js +0 -277
- package/src/util/resolveConfigPath.js +0 -66
- package/src/util/responsive.js +0 -10
- package/src/util/splitAtTopLevelOnly.js +0 -52
- package/src/util/tap.js +0 -4
- package/src/util/toColorValue.js +0 -3
- package/src/util/toPath.js +0 -26
- package/src/util/transformThemeValue.js +0 -62
- package/src/util/validateConfig.js +0 -26
- package/src/util/validateFormalSyntax.js +0 -34
- package/src/util/withAlphaVariable.js +0 -49
- package/src/value-parser/LICENSE +0 -22
- package/src/value-parser/README.md +0 -3
- package/src/value-parser/index.d.ts +0 -177
- package/src/value-parser/index.js +0 -28
- package/src/value-parser/parse.js +0 -303
- package/src/value-parser/stringify.js +0 -41
- package/src/value-parser/unit.js +0 -118
- package/src/value-parser/walk.js +0 -18
- package/stubs/.gitignore +0 -1
- package/stubs/.prettierrc.json +0 -6
- package/stubs/config.full.js +0 -1062
- package/stubs/config.simple.js +0 -7
- package/stubs/postcss.config.cjs +0 -6
- package/stubs/postcss.config.js +0 -6
- package/stubs/tailwind.config.cjs +0 -2
- package/stubs/tailwind.config.js +0 -2
- package/stubs/tailwind.config.ts +0 -3
- package/tailwind.css +0 -5
- package/types/config.d.ts +0 -376
- package/types/generated/.gitkeep +0 -0
- package/types/generated/colors.d.ts +0 -298
- package/types/generated/corePluginList.d.ts +0 -1
- package/types/generated/default-theme.d.ts +0 -397
- package/types/index.d.ts +0 -11
- package/variants.css +0 -1
@@ -1,42 +0,0 @@
|
|
1
|
-
# tailwindcss/nesting
|
2
|
-
|
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
|
-
|
5
|
-
Add it to your PostCSS configuration, somewhere before Tailwind itself:
|
6
|
-
|
7
|
-
```js
|
8
|
-
// postcss.config.js
|
9
|
-
module.exports = {
|
10
|
-
plugins: [
|
11
|
-
require('postcss-import'),
|
12
|
-
require('tailwindcss/nesting'),
|
13
|
-
require('tailwindcss'),
|
14
|
-
require('autoprefixer'),
|
15
|
-
]
|
16
|
-
}
|
17
|
-
```
|
18
|
-
|
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
|
-
|
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
|
-
|
23
|
-
```shell
|
24
|
-
npm install postcss-nesting
|
25
|
-
```
|
26
|
-
|
27
|
-
Then pass the plugin itself as an argument to `tailwindcss/nesting` in your PostCSS configuration:
|
28
|
-
|
29
|
-
```js
|
30
|
-
// postcss.config.js
|
31
|
-
module.exports = {
|
32
|
-
plugins: [
|
33
|
-
require('postcss-import'),
|
34
|
-
require('tailwindcss/nesting')(require('postcss-nesting')),
|
35
|
-
require('tailwindcss'),
|
36
|
-
require('autoprefixer'),
|
37
|
-
]
|
38
|
-
}
|
39
|
-
```
|
40
|
-
|
41
|
-
This can also be helpful if for whatever reason you need to use a very specific version of `postcss-nested` and want to override the version we bundle with `tailwindcss/nesting` itself.
|
42
|
-
|
@@ -1,80 +0,0 @@
|
|
1
|
-
import postcss from 'postcss'
|
2
|
-
import postcssNested from 'postcss-nested'
|
3
|
-
|
4
|
-
export function nesting(opts = postcssNested) {
|
5
|
-
return (root, result) => {
|
6
|
-
root.walkAtRules('screen', (rule) => {
|
7
|
-
rule.name = 'media'
|
8
|
-
rule.params = `screen(${rule.params})`
|
9
|
-
})
|
10
|
-
|
11
|
-
root.walkAtRules('apply', (rule) => {
|
12
|
-
rule.before(postcss.decl({ prop: '__apply', value: rule.params, source: rule.source }))
|
13
|
-
rule.remove()
|
14
|
-
})
|
15
|
-
|
16
|
-
let plugin = (() => {
|
17
|
-
if (
|
18
|
-
typeof opts === 'function' ||
|
19
|
-
(typeof opts === 'object' && opts?.hasOwnProperty?.('postcssPlugin'))
|
20
|
-
) {
|
21
|
-
return opts
|
22
|
-
}
|
23
|
-
|
24
|
-
if (typeof opts === 'string') {
|
25
|
-
return require(opts)
|
26
|
-
}
|
27
|
-
|
28
|
-
if (Object.keys(opts).length <= 0) {
|
29
|
-
return postcssNested
|
30
|
-
}
|
31
|
-
|
32
|
-
throw new Error('tailwindcss/nesting should be loaded with a nesting plugin.')
|
33
|
-
})()
|
34
|
-
|
35
|
-
postcss([plugin]).process(root, result.opts).sync()
|
36
|
-
|
37
|
-
root.walkDecls('__apply', (decl) => {
|
38
|
-
decl.before(postcss.atRule({ name: 'apply', params: decl.value, source: decl.source }))
|
39
|
-
decl.remove()
|
40
|
-
})
|
41
|
-
|
42
|
-
/**
|
43
|
-
* Use a private PostCSS API to remove the "clean" flag from the entire AST.
|
44
|
-
* This is done because running process() on the AST will set the "clean"
|
45
|
-
* flag on all nodes, which we don't want.
|
46
|
-
*
|
47
|
-
* This causes downstream plugins using the visitor API to be skipped.
|
48
|
-
*
|
49
|
-
* This is guarded because the PostCSS API is not public
|
50
|
-
* and may change in future versions of PostCSS.
|
51
|
-
*
|
52
|
-
* See https://github.com/postcss/postcss/issues/1712 for more details
|
53
|
-
*
|
54
|
-
* @param {import('postcss').Node} node
|
55
|
-
*/
|
56
|
-
function markDirty(node) {
|
57
|
-
if (!('markDirty' in node)) {
|
58
|
-
return
|
59
|
-
}
|
60
|
-
|
61
|
-
// Traverse the tree down to the leaf nodes
|
62
|
-
if (node.nodes) {
|
63
|
-
node.nodes.forEach((n) => markDirty(n))
|
64
|
-
}
|
65
|
-
|
66
|
-
// If it's a leaf node mark it as dirty
|
67
|
-
// We do this here because marking a node as dirty
|
68
|
-
// will walk up the tree and mark all parents as dirty
|
69
|
-
// resulting in a lot of unnecessary work if we did this
|
70
|
-
// for every single node
|
71
|
-
if (!node.nodes) {
|
72
|
-
node.markDirty()
|
73
|
-
}
|
74
|
-
}
|
75
|
-
|
76
|
-
markDirty(root)
|
77
|
-
|
78
|
-
return root
|
79
|
-
}
|
80
|
-
}
|
@@ -1,59 +0,0 @@
|
|
1
|
-
import normalizeTailwindDirectives from './lib/normalizeTailwindDirectives'
|
2
|
-
import expandTailwindAtRules from './lib/expandTailwindAtRules'
|
3
|
-
import expandApplyAtRules from './lib/expandApplyAtRules'
|
4
|
-
import evaluateTailwindFunctions from './lib/evaluateTailwindFunctions'
|
5
|
-
import substituteScreenAtRules from './lib/substituteScreenAtRules'
|
6
|
-
import resolveDefaultsAtRules from './lib/resolveDefaultsAtRules'
|
7
|
-
import collapseAdjacentRules from './lib/collapseAdjacentRules'
|
8
|
-
import collapseDuplicateDeclarations from './lib/collapseDuplicateDeclarations'
|
9
|
-
import partitionApplyAtRules from './lib/partitionApplyAtRules'
|
10
|
-
import detectNesting from './lib/detectNesting'
|
11
|
-
import { createContext } from './lib/setupContextUtils'
|
12
|
-
import { issueFlagNotices } from './featureFlags'
|
13
|
-
|
14
|
-
export default function processTailwindFeatures(setupContext) {
|
15
|
-
return async function (root, result) {
|
16
|
-
let { tailwindDirectives, applyDirectives } = normalizeTailwindDirectives(root)
|
17
|
-
|
18
|
-
detectNesting()(root, result)
|
19
|
-
|
20
|
-
// Partition apply rules that are found in the css
|
21
|
-
// itself.
|
22
|
-
partitionApplyAtRules()(root, result)
|
23
|
-
|
24
|
-
let context = setupContext({
|
25
|
-
tailwindDirectives,
|
26
|
-
applyDirectives,
|
27
|
-
registerDependency(dependency) {
|
28
|
-
result.messages.push({
|
29
|
-
plugin: 'tailwindcss',
|
30
|
-
parent: result.opts.from,
|
31
|
-
...dependency,
|
32
|
-
})
|
33
|
-
},
|
34
|
-
createContext(tailwindConfig, changedContent) {
|
35
|
-
return createContext(tailwindConfig, changedContent, root)
|
36
|
-
},
|
37
|
-
})(root, result)
|
38
|
-
|
39
|
-
if (context.tailwindConfig.separator === '-') {
|
40
|
-
throw new Error(
|
41
|
-
"The '-' character cannot be used as a custom separator in JIT mode due to parsing ambiguity. Please use another character like '_' instead."
|
42
|
-
)
|
43
|
-
}
|
44
|
-
|
45
|
-
issueFlagNotices(context.tailwindConfig)
|
46
|
-
|
47
|
-
await expandTailwindAtRules(context)(root, result)
|
48
|
-
|
49
|
-
// Partition apply rules that are generated by
|
50
|
-
// addComponents, addUtilities and so on.
|
51
|
-
partitionApplyAtRules()(root, result)
|
52
|
-
expandApplyAtRules(context)(root, result)
|
53
|
-
evaluateTailwindFunctions(context)(root, result)
|
54
|
-
substituteScreenAtRules(context)(root, result)
|
55
|
-
resolveDefaultsAtRules(context)(root, result)
|
56
|
-
collapseAdjacentRules(context)(root, result)
|
57
|
-
collapseDuplicateDeclarations(context)(root, result)
|
58
|
-
}
|
59
|
-
}
|
package/src/public/colors.js
DELETED
@@ -1,322 +0,0 @@
|
|
1
|
-
import log from '../util/log'
|
2
|
-
|
3
|
-
function warn({ version, from, to }) {
|
4
|
-
log.warn(`${from}-color-renamed`, [
|
5
|
-
`As of Tailwind CSS ${version}, \`${from}\` has been renamed to \`${to}\`.`,
|
6
|
-
'Update your configuration file to silence this warning.',
|
7
|
-
])
|
8
|
-
}
|
9
|
-
|
10
|
-
export default {
|
11
|
-
inherit: 'inherit',
|
12
|
-
current: 'currentColor',
|
13
|
-
transparent: 'transparent',
|
14
|
-
black: '#000',
|
15
|
-
white: '#fff',
|
16
|
-
slate: {
|
17
|
-
50: '#f8fafc',
|
18
|
-
100: '#f1f5f9',
|
19
|
-
200: '#e2e8f0',
|
20
|
-
300: '#cbd5e1',
|
21
|
-
400: '#94a3b8',
|
22
|
-
500: '#64748b',
|
23
|
-
600: '#475569',
|
24
|
-
700: '#334155',
|
25
|
-
800: '#1e293b',
|
26
|
-
900: '#0f172a',
|
27
|
-
950: '#020617',
|
28
|
-
},
|
29
|
-
gray: {
|
30
|
-
50: '#f9fafb',
|
31
|
-
100: '#f3f4f6',
|
32
|
-
200: '#e5e7eb',
|
33
|
-
300: '#d1d5db',
|
34
|
-
400: '#9ca3af',
|
35
|
-
500: '#6b7280',
|
36
|
-
600: '#4b5563',
|
37
|
-
700: '#374151',
|
38
|
-
800: '#1f2937',
|
39
|
-
900: '#111827',
|
40
|
-
950: '#030712',
|
41
|
-
},
|
42
|
-
zinc: {
|
43
|
-
50: '#fafafa',
|
44
|
-
100: '#f4f4f5',
|
45
|
-
200: '#e4e4e7',
|
46
|
-
300: '#d4d4d8',
|
47
|
-
400: '#a1a1aa',
|
48
|
-
500: '#71717a',
|
49
|
-
600: '#52525b',
|
50
|
-
700: '#3f3f46',
|
51
|
-
800: '#27272a',
|
52
|
-
900: '#18181b',
|
53
|
-
950: '#09090b',
|
54
|
-
},
|
55
|
-
neutral: {
|
56
|
-
50: '#fafafa',
|
57
|
-
100: '#f5f5f5',
|
58
|
-
200: '#e5e5e5',
|
59
|
-
300: '#d4d4d4',
|
60
|
-
400: '#a3a3a3',
|
61
|
-
500: '#737373',
|
62
|
-
600: '#525252',
|
63
|
-
700: '#404040',
|
64
|
-
800: '#262626',
|
65
|
-
900: '#171717',
|
66
|
-
950: '#0a0a0a',
|
67
|
-
},
|
68
|
-
stone: {
|
69
|
-
50: '#fafaf9',
|
70
|
-
100: '#f5f5f4',
|
71
|
-
200: '#e7e5e4',
|
72
|
-
300: '#d6d3d1',
|
73
|
-
400: '#a8a29e',
|
74
|
-
500: '#78716c',
|
75
|
-
600: '#57534e',
|
76
|
-
700: '#44403c',
|
77
|
-
800: '#292524',
|
78
|
-
900: '#1c1917',
|
79
|
-
950: '#0c0a09',
|
80
|
-
},
|
81
|
-
red: {
|
82
|
-
50: '#fef2f2',
|
83
|
-
100: '#fee2e2',
|
84
|
-
200: '#fecaca',
|
85
|
-
300: '#fca5a5',
|
86
|
-
400: '#f87171',
|
87
|
-
500: '#ef4444',
|
88
|
-
600: '#dc2626',
|
89
|
-
700: '#b91c1c',
|
90
|
-
800: '#991b1b',
|
91
|
-
900: '#7f1d1d',
|
92
|
-
950: '#450a0a',
|
93
|
-
},
|
94
|
-
orange: {
|
95
|
-
50: '#fff7ed',
|
96
|
-
100: '#ffedd5',
|
97
|
-
200: '#fed7aa',
|
98
|
-
300: '#fdba74',
|
99
|
-
400: '#fb923c',
|
100
|
-
500: '#f97316',
|
101
|
-
600: '#ea580c',
|
102
|
-
700: '#c2410c',
|
103
|
-
800: '#9a3412',
|
104
|
-
900: '#7c2d12',
|
105
|
-
950: '#431407',
|
106
|
-
},
|
107
|
-
amber: {
|
108
|
-
50: '#fffbeb',
|
109
|
-
100: '#fef3c7',
|
110
|
-
200: '#fde68a',
|
111
|
-
300: '#fcd34d',
|
112
|
-
400: '#fbbf24',
|
113
|
-
500: '#f59e0b',
|
114
|
-
600: '#d97706',
|
115
|
-
700: '#b45309',
|
116
|
-
800: '#92400e',
|
117
|
-
900: '#78350f',
|
118
|
-
950: '#451a03',
|
119
|
-
},
|
120
|
-
yellow: {
|
121
|
-
50: '#fefce8',
|
122
|
-
100: '#fef9c3',
|
123
|
-
200: '#fef08a',
|
124
|
-
300: '#fde047',
|
125
|
-
400: '#facc15',
|
126
|
-
500: '#eab308',
|
127
|
-
600: '#ca8a04',
|
128
|
-
700: '#a16207',
|
129
|
-
800: '#854d0e',
|
130
|
-
900: '#713f12',
|
131
|
-
950: '#422006',
|
132
|
-
},
|
133
|
-
lime: {
|
134
|
-
50: '#f7fee7',
|
135
|
-
100: '#ecfccb',
|
136
|
-
200: '#d9f99d',
|
137
|
-
300: '#bef264',
|
138
|
-
400: '#a3e635',
|
139
|
-
500: '#84cc16',
|
140
|
-
600: '#65a30d',
|
141
|
-
700: '#4d7c0f',
|
142
|
-
800: '#3f6212',
|
143
|
-
900: '#365314',
|
144
|
-
950: '#1a2e05',
|
145
|
-
},
|
146
|
-
green: {
|
147
|
-
50: '#f0fdf4',
|
148
|
-
100: '#dcfce7',
|
149
|
-
200: '#bbf7d0',
|
150
|
-
300: '#86efac',
|
151
|
-
400: '#4ade80',
|
152
|
-
500: '#22c55e',
|
153
|
-
600: '#16a34a',
|
154
|
-
700: '#15803d',
|
155
|
-
800: '#166534',
|
156
|
-
900: '#14532d',
|
157
|
-
950: '#052e16',
|
158
|
-
},
|
159
|
-
emerald: {
|
160
|
-
50: '#ecfdf5',
|
161
|
-
100: '#d1fae5',
|
162
|
-
200: '#a7f3d0',
|
163
|
-
300: '#6ee7b7',
|
164
|
-
400: '#34d399',
|
165
|
-
500: '#10b981',
|
166
|
-
600: '#059669',
|
167
|
-
700: '#047857',
|
168
|
-
800: '#065f46',
|
169
|
-
900: '#064e3b',
|
170
|
-
950: '#022c22',
|
171
|
-
},
|
172
|
-
teal: {
|
173
|
-
50: '#f0fdfa',
|
174
|
-
100: '#ccfbf1',
|
175
|
-
200: '#99f6e4',
|
176
|
-
300: '#5eead4',
|
177
|
-
400: '#2dd4bf',
|
178
|
-
500: '#14b8a6',
|
179
|
-
600: '#0d9488',
|
180
|
-
700: '#0f766e',
|
181
|
-
800: '#115e59',
|
182
|
-
900: '#134e4a',
|
183
|
-
950: '#042f2e',
|
184
|
-
},
|
185
|
-
cyan: {
|
186
|
-
50: '#ecfeff',
|
187
|
-
100: '#cffafe',
|
188
|
-
200: '#a5f3fc',
|
189
|
-
300: '#67e8f9',
|
190
|
-
400: '#22d3ee',
|
191
|
-
500: '#06b6d4',
|
192
|
-
600: '#0891b2',
|
193
|
-
700: '#0e7490',
|
194
|
-
800: '#155e75',
|
195
|
-
900: '#164e63',
|
196
|
-
950: '#083344',
|
197
|
-
},
|
198
|
-
sky: {
|
199
|
-
50: '#f0f9ff',
|
200
|
-
100: '#e0f2fe',
|
201
|
-
200: '#bae6fd',
|
202
|
-
300: '#7dd3fc',
|
203
|
-
400: '#38bdf8',
|
204
|
-
500: '#0ea5e9',
|
205
|
-
600: '#0284c7',
|
206
|
-
700: '#0369a1',
|
207
|
-
800: '#075985',
|
208
|
-
900: '#0c4a6e',
|
209
|
-
950: '#082f49',
|
210
|
-
},
|
211
|
-
blue: {
|
212
|
-
50: '#eff6ff',
|
213
|
-
100: '#dbeafe',
|
214
|
-
200: '#bfdbfe',
|
215
|
-
300: '#93c5fd',
|
216
|
-
400: '#60a5fa',
|
217
|
-
500: '#3b82f6',
|
218
|
-
600: '#2563eb',
|
219
|
-
700: '#1d4ed8',
|
220
|
-
800: '#1e40af',
|
221
|
-
900: '#1e3a8a',
|
222
|
-
950: '#172554',
|
223
|
-
},
|
224
|
-
indigo: {
|
225
|
-
50: '#eef2ff',
|
226
|
-
100: '#e0e7ff',
|
227
|
-
200: '#c7d2fe',
|
228
|
-
300: '#a5b4fc',
|
229
|
-
400: '#818cf8',
|
230
|
-
500: '#6366f1',
|
231
|
-
600: '#4f46e5',
|
232
|
-
700: '#4338ca',
|
233
|
-
800: '#3730a3',
|
234
|
-
900: '#312e81',
|
235
|
-
950: '#1e1b4b',
|
236
|
-
},
|
237
|
-
violet: {
|
238
|
-
50: '#f5f3ff',
|
239
|
-
100: '#ede9fe',
|
240
|
-
200: '#ddd6fe',
|
241
|
-
300: '#c4b5fd',
|
242
|
-
400: '#a78bfa',
|
243
|
-
500: '#8b5cf6',
|
244
|
-
600: '#7c3aed',
|
245
|
-
700: '#6d28d9',
|
246
|
-
800: '#5b21b6',
|
247
|
-
900: '#4c1d95',
|
248
|
-
950: '#2e1065',
|
249
|
-
},
|
250
|
-
purple: {
|
251
|
-
50: '#faf5ff',
|
252
|
-
100: '#f3e8ff',
|
253
|
-
200: '#e9d5ff',
|
254
|
-
300: '#d8b4fe',
|
255
|
-
400: '#c084fc',
|
256
|
-
500: '#a855f7',
|
257
|
-
600: '#9333ea',
|
258
|
-
700: '#7e22ce',
|
259
|
-
800: '#6b21a8',
|
260
|
-
900: '#581c87',
|
261
|
-
950: '#3b0764',
|
262
|
-
},
|
263
|
-
fuchsia: {
|
264
|
-
50: '#fdf4ff',
|
265
|
-
100: '#fae8ff',
|
266
|
-
200: '#f5d0fe',
|
267
|
-
300: '#f0abfc',
|
268
|
-
400: '#e879f9',
|
269
|
-
500: '#d946ef',
|
270
|
-
600: '#c026d3',
|
271
|
-
700: '#a21caf',
|
272
|
-
800: '#86198f',
|
273
|
-
900: '#701a75',
|
274
|
-
950: '#4a044e',
|
275
|
-
},
|
276
|
-
pink: {
|
277
|
-
50: '#fdf2f8',
|
278
|
-
100: '#fce7f3',
|
279
|
-
200: '#fbcfe8',
|
280
|
-
300: '#f9a8d4',
|
281
|
-
400: '#f472b6',
|
282
|
-
500: '#ec4899',
|
283
|
-
600: '#db2777',
|
284
|
-
700: '#be185d',
|
285
|
-
800: '#9d174d',
|
286
|
-
900: '#831843',
|
287
|
-
950: '#500724',
|
288
|
-
},
|
289
|
-
rose: {
|
290
|
-
50: '#fff1f2',
|
291
|
-
100: '#ffe4e6',
|
292
|
-
200: '#fecdd3',
|
293
|
-
300: '#fda4af',
|
294
|
-
400: '#fb7185',
|
295
|
-
500: '#f43f5e',
|
296
|
-
600: '#e11d48',
|
297
|
-
700: '#be123c',
|
298
|
-
800: '#9f1239',
|
299
|
-
900: '#881337',
|
300
|
-
950: '#4c0519',
|
301
|
-
},
|
302
|
-
get lightBlue() {
|
303
|
-
warn({ version: 'v2.2', from: 'lightBlue', to: 'sky' })
|
304
|
-
return this.sky
|
305
|
-
},
|
306
|
-
get warmGray() {
|
307
|
-
warn({ version: 'v3.0', from: 'warmGray', to: 'stone' })
|
308
|
-
return this.stone
|
309
|
-
},
|
310
|
-
get trueGray() {
|
311
|
-
warn({ version: 'v3.0', from: 'trueGray', to: 'neutral' })
|
312
|
-
return this.neutral
|
313
|
-
},
|
314
|
-
get coolGray() {
|
315
|
-
warn({ version: 'v3.0', from: 'coolGray', to: 'gray' })
|
316
|
-
return this.gray
|
317
|
-
},
|
318
|
-
get blueGray() {
|
319
|
-
warn({ version: 'v3.0', from: 'blueGray', to: 'slate' })
|
320
|
-
return this.slate
|
321
|
-
},
|
322
|
-
}
|
@@ -1,7 +0,0 @@
|
|
1
|
-
import resolveConfigObjects from '../util/resolveConfig'
|
2
|
-
import getAllConfigs from '../util/getAllConfigs'
|
3
|
-
|
4
|
-
export default function resolveConfig(...configs) {
|
5
|
-
let [, ...defaultConfigs] = getAllConfigs(configs[0])
|
6
|
-
return resolveConfigObjects([...configs, ...defaultConfigs])
|
7
|
-
}
|
@@ -1,27 +0,0 @@
|
|
1
|
-
import parser from 'postcss-selector-parser'
|
2
|
-
import { movePseudos } from './pseudoElements'
|
3
|
-
|
4
|
-
export function applyImportantSelector(selector, important) {
|
5
|
-
let sel = parser().astSync(selector)
|
6
|
-
|
7
|
-
sel.each((sel) => {
|
8
|
-
// Wrap with :is if it's not already wrapped
|
9
|
-
let isWrapped =
|
10
|
-
sel.nodes[0].type === 'pseudo' &&
|
11
|
-
sel.nodes[0].value === ':is' &&
|
12
|
-
sel.nodes.every((node) => node.type !== 'combinator')
|
13
|
-
|
14
|
-
if (!isWrapped) {
|
15
|
-
sel.nodes = [
|
16
|
-
parser.pseudo({
|
17
|
-
value: ':is',
|
18
|
-
nodes: [sel.clone()],
|
19
|
-
}),
|
20
|
-
]
|
21
|
-
}
|
22
|
-
|
23
|
-
movePseudos(sel)
|
24
|
-
})
|
25
|
-
|
26
|
-
return `${important} ${sel.toString()}`
|
27
|
-
}
|
package/src/util/bigSign.js
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
export default function buildMediaQuery(screens) {
|
2
|
-
screens = Array.isArray(screens) ? screens : [screens]
|
3
|
-
|
4
|
-
return screens
|
5
|
-
.map((screen) => {
|
6
|
-
let values = screen.values.map((screen) => {
|
7
|
-
if (screen.raw !== undefined) {
|
8
|
-
return screen.raw
|
9
|
-
}
|
10
|
-
|
11
|
-
return [
|
12
|
-
screen.min && `(min-width: ${screen.min})`,
|
13
|
-
screen.max && `(max-width: ${screen.max})`,
|
14
|
-
]
|
15
|
-
.filter(Boolean)
|
16
|
-
.join(' and ')
|
17
|
-
})
|
18
|
-
|
19
|
-
return screen.not ? `not all and ${values}` : values
|
20
|
-
})
|
21
|
-
.join(', ')
|
22
|
-
}
|
package/src/util/cloneDeep.js
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
export function cloneDeep(value) {
|
2
|
-
if (Array.isArray(value)) {
|
3
|
-
return value.map((child) => cloneDeep(child))
|
4
|
-
}
|
5
|
-
|
6
|
-
if (typeof value === 'object' && value !== null) {
|
7
|
-
return Object.fromEntries(Object.entries(value).map(([k, v]) => [k, cloneDeep(v)]))
|
8
|
-
}
|
9
|
-
|
10
|
-
return value
|
11
|
-
}
|
package/src/util/cloneNodes.js
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @param {import('postcss').Container[]} nodes
|
3
|
-
* @param {any} source
|
4
|
-
* @param {any} raws
|
5
|
-
* @returns {import('postcss').Container[]}
|
6
|
-
*/
|
7
|
-
export default function cloneNodes(nodes, source = undefined, raws = undefined) {
|
8
|
-
return nodes.map((node) => {
|
9
|
-
let cloned = node.clone()
|
10
|
-
|
11
|
-
if (raws !== undefined) {
|
12
|
-
cloned.raws.tailwind = {
|
13
|
-
...cloned.raws.tailwind,
|
14
|
-
...raws,
|
15
|
-
}
|
16
|
-
}
|
17
|
-
|
18
|
-
if (source !== undefined) {
|
19
|
-
traverse(cloned, (node) => {
|
20
|
-
// Do not traverse nodes that have opted
|
21
|
-
// to preserve their original source
|
22
|
-
let shouldPreserveSource = node.raws.tailwind?.preserveSource === true && node.source
|
23
|
-
if (shouldPreserveSource) {
|
24
|
-
return false
|
25
|
-
}
|
26
|
-
|
27
|
-
// Otherwise we can safely replace the source
|
28
|
-
// And continue traversing
|
29
|
-
node.source = source
|
30
|
-
})
|
31
|
-
}
|
32
|
-
|
33
|
-
return cloned
|
34
|
-
})
|
35
|
-
}
|
36
|
-
|
37
|
-
/**
|
38
|
-
* Traverse a tree of nodes and don't traverse children if the callback
|
39
|
-
* returns false. Ideally we'd use Container#walk instead of this
|
40
|
-
* function but it stops traversing siblings too.
|
41
|
-
*
|
42
|
-
* @param {import('postcss').Container} node
|
43
|
-
* @param {(node: import('postcss').Container) => boolean} onNode
|
44
|
-
*/
|
45
|
-
function traverse(node, onNode) {
|
46
|
-
if (onNode(node) !== false) {
|
47
|
-
node.each?.((child) => traverse(child, onNode))
|
48
|
-
}
|
49
|
-
}
|