tailwindcss 0.0.0-insiders.ca1dfd6 → 0.0.0-insiders.cb6e45a
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 +526 -2
- package/LICENSE +1 -2
- package/README.md +13 -6
- package/colors.d.ts +3 -0
- package/colors.js +2 -1
- package/defaultConfig.d.ts +3 -0
- package/defaultConfig.js +2 -1
- package/defaultTheme.d.ts +4 -0
- package/defaultTheme.js +2 -1
- package/lib/cli/build/deps.js +54 -0
- package/lib/cli/build/index.js +44 -0
- package/lib/cli/build/plugin.js +335 -0
- package/lib/cli/build/utils.js +78 -0
- package/lib/cli/build/watching.js +113 -0
- package/lib/cli/help/index.js +71 -0
- package/lib/cli/index.js +18 -0
- package/lib/cli/init/index.js +46 -0
- package/lib/cli/shared.js +12 -0
- package/lib/cli-peer-dependencies.js +20 -7
- package/lib/cli.js +91 -569
- package/lib/constants.js +27 -20
- package/lib/corePluginList.js +16 -4
- package/lib/corePlugins.js +2247 -1873
- package/lib/css/preflight.css +20 -9
- package/lib/featureFlags.js +37 -23
- package/lib/index.js +28 -12
- package/lib/lib/cacheInvalidation.js +90 -0
- package/lib/lib/collapseAdjacentRules.js +27 -9
- package/lib/lib/collapseDuplicateDeclarations.js +83 -0
- package/lib/lib/content.js +167 -0
- package/lib/lib/defaultExtractor.js +236 -0
- package/lib/lib/detectNesting.js +21 -3
- package/lib/lib/evaluateTailwindFunctions.js +117 -50
- package/lib/lib/expandApplyAtRules.js +439 -160
- package/lib/lib/expandTailwindAtRules.js +141 -151
- package/lib/lib/findAtConfigPath.js +44 -0
- package/lib/lib/generateRules.js +572 -105
- package/lib/lib/getModuleDependencies.js +11 -8
- package/lib/lib/normalizeTailwindDirectives.js +45 -33
- package/lib/lib/offsets.js +217 -0
- package/lib/lib/partitionApplyAtRules.js +56 -0
- package/lib/lib/regex.js +60 -0
- package/lib/lib/resolveDefaultsAtRules.js +114 -81
- package/lib/lib/setupContextUtils.js +777 -385
- package/lib/lib/setupTrackingContext.js +43 -71
- package/lib/lib/sharedState.js +49 -18
- package/lib/lib/substituteScreenAtRules.js +13 -8
- package/{nesting → lib/postcss-plugins/nesting}/README.md +2 -2
- package/lib/postcss-plugins/nesting/index.js +19 -0
- package/lib/postcss-plugins/nesting/plugin.js +87 -0
- package/lib/processTailwindFeatures.js +36 -21
- package/lib/public/colors.js +250 -252
- package/lib/public/create-plugin.js +6 -4
- package/lib/public/default-config.js +7 -5
- package/lib/public/default-theme.js +7 -5
- package/lib/public/resolve-config.js +8 -5
- package/lib/util/bigSign.js +4 -1
- package/lib/util/buildMediaQuery.js +18 -24
- package/lib/util/cloneDeep.js +7 -6
- package/lib/util/cloneNodes.js +21 -3
- package/lib/util/color.js +54 -40
- package/lib/util/configurePlugins.js +5 -2
- package/lib/util/createPlugin.js +6 -6
- package/lib/util/createUtilityPlugin.js +11 -13
- package/lib/util/dataTypes.js +137 -100
- package/lib/util/defaults.js +10 -1
- package/lib/util/escapeClassName.js +7 -4
- package/lib/util/escapeCommas.js +5 -2
- package/lib/util/flattenColorPalette.js +9 -12
- package/lib/util/formatVariantSelector.js +285 -0
- package/lib/util/getAllConfigs.js +27 -8
- package/lib/util/hashConfig.js +6 -3
- package/lib/util/isKeyframeRule.js +5 -2
- package/lib/util/isPlainObject.js +5 -2
- package/lib/util/isValidArbitraryValue.js +72 -0
- package/lib/util/log.js +44 -22
- package/lib/util/nameClass.js +20 -8
- package/lib/util/negateValue.js +23 -6
- package/lib/util/normalizeConfig.js +267 -0
- package/lib/util/normalizeScreens.js +170 -0
- package/lib/util/parseAnimationValue.js +42 -40
- package/lib/util/parseBoxShadowValue.js +84 -0
- package/lib/util/parseDependency.js +38 -56
- package/lib/util/parseGlob.js +34 -0
- package/lib/util/parseObjectStyles.js +11 -8
- package/lib/util/pluginUtils.js +171 -189
- package/lib/util/prefixSelector.js +10 -10
- package/lib/util/removeAlphaVariables.js +29 -0
- package/lib/util/resolveConfig.js +92 -126
- package/lib/util/resolveConfigPath.js +11 -9
- package/lib/util/responsive.js +8 -5
- package/lib/util/splitAtTopLevelOnly.js +43 -0
- package/lib/util/tap.js +4 -1
- package/lib/util/toColorValue.js +5 -3
- package/lib/util/toPath.js +24 -3
- package/lib/util/transformThemeValue.js +49 -31
- package/lib/util/validateConfig.js +24 -0
- package/lib/util/validateFormalSyntax.js +24 -0
- package/lib/util/withAlphaVariable.js +23 -15
- package/nesting/index.js +2 -12
- package/package.json +48 -46
- package/peers/index.js +14817 -12471
- package/plugin.d.ts +11 -0
- package/plugin.js +2 -1
- package/resolveConfig.d.ts +3 -0
- package/resolveConfig.js +2 -1
- package/scripts/create-plugin-list.js +2 -2
- package/scripts/generate-types.js +105 -0
- package/scripts/release-channel.js +18 -0
- package/scripts/release-notes.js +21 -0
- package/scripts/type-utils.js +27 -0
- package/src/cli/build/deps.js +56 -0
- package/src/cli/build/index.js +45 -0
- package/src/cli/build/plugin.js +397 -0
- package/src/cli/build/utils.js +76 -0
- package/src/cli/build/watching.js +134 -0
- package/src/cli/help/index.js +70 -0
- package/src/cli/index.js +3 -0
- package/src/cli/init/index.js +50 -0
- package/src/cli/shared.js +5 -0
- package/src/cli-peer-dependencies.js +7 -1
- package/src/cli.js +26 -565
- package/src/corePluginList.js +1 -1
- package/src/corePlugins.js +905 -615
- package/src/css/preflight.css +20 -9
- package/src/featureFlags.js +26 -10
- package/src/index.js +19 -6
- package/src/lib/cacheInvalidation.js +52 -0
- package/src/lib/collapseAdjacentRules.js +21 -2
- package/src/lib/collapseDuplicateDeclarations.js +93 -0
- package/src/lib/content.js +205 -0
- package/src/lib/defaultExtractor.js +211 -0
- package/src/lib/detectNesting.js +22 -3
- package/src/lib/evaluateTailwindFunctions.js +84 -10
- package/src/lib/expandApplyAtRules.js +488 -153
- package/src/lib/expandTailwindAtRules.js +94 -106
- package/src/lib/findAtConfigPath.js +50 -0
- package/src/lib/generateRules.js +589 -67
- package/src/lib/normalizeTailwindDirectives.js +10 -3
- package/src/lib/offsets.js +270 -0
- package/src/lib/partitionApplyAtRules.js +52 -0
- package/src/lib/regex.js +74 -0
- package/src/lib/resolveDefaultsAtRules.js +98 -60
- package/src/lib/setupContextUtils.js +737 -246
- package/src/lib/setupTrackingContext.js +16 -54
- package/src/lib/sharedState.js +44 -7
- package/src/lib/substituteScreenAtRules.js +6 -3
- package/src/postcss-plugins/nesting/README.md +42 -0
- package/src/postcss-plugins/nesting/index.js +13 -0
- package/src/postcss-plugins/nesting/plugin.js +80 -0
- package/src/processTailwindFeatures.js +17 -2
- package/src/public/colors.js +4 -9
- package/src/util/buildMediaQuery.js +14 -16
- package/src/util/cloneNodes.js +19 -2
- package/src/util/color.js +31 -14
- package/src/util/createUtilityPlugin.js +2 -2
- package/src/util/dataTypes.js +57 -21
- package/src/util/defaults.js +6 -0
- package/src/util/formatVariantSelector.js +319 -0
- package/src/util/getAllConfigs.js +19 -0
- package/src/util/isValidArbitraryValue.js +61 -0
- package/src/util/log.js +23 -22
- package/src/util/nameClass.js +6 -2
- package/src/util/negateValue.js +14 -4
- package/src/util/normalizeConfig.js +282 -0
- package/src/util/normalizeScreens.js +140 -0
- package/src/util/parseBoxShadowValue.js +72 -0
- package/src/util/parseDependency.js +37 -42
- package/src/util/parseGlob.js +24 -0
- package/src/util/pluginUtils.js +144 -152
- package/src/util/prefixSelector.js +7 -8
- package/src/util/removeAlphaVariables.js +24 -0
- package/src/util/resolveConfig.js +82 -81
- package/src/util/splitAtTopLevelOnly.js +45 -0
- package/src/util/toPath.js +23 -1
- package/src/util/transformThemeValue.js +33 -8
- package/src/util/validateConfig.js +13 -0
- package/src/util/validateFormalSyntax.js +34 -0
- package/src/util/withAlphaVariable.js +1 -1
- package/stubs/defaultConfig.stub.js +173 -93
- package/stubs/simpleConfig.stub.js +1 -1
- package/types/config.d.ts +361 -0
- package/types/generated/.gitkeep +0 -0
- package/types/generated/colors.d.ts +276 -0
- package/types/generated/corePluginList.d.ts +1 -0
- package/types/generated/default-theme.d.ts +342 -0
- package/types/index.d.ts +7 -0
- package/lib/lib/setupWatchingContext.js +0 -284
- package/nesting/plugin.js +0 -41
- package/src/lib/setupWatchingContext.js +0 -306
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This splits a string on a top-level character.
|
|
3
|
+
*
|
|
4
|
+
* Regex doesn't support recursion (at least not the JS-flavored version).
|
|
5
|
+
* So we have to use a tiny state machine to keep track of paren placement.
|
|
6
|
+
*
|
|
7
|
+
* Expected behavior using commas:
|
|
8
|
+
* var(--a, 0 0 1px rgb(0, 0, 0)), 0 0 1px rgb(0, 0, 0)
|
|
9
|
+
* ─┬─ ┬ ┬ ┬
|
|
10
|
+
* x x x ╰──────── Split because top-level
|
|
11
|
+
* ╰──────────────┴──┴───────────── Ignored b/c inside >= 1 levels of parens
|
|
12
|
+
*
|
|
13
|
+
* @param {string} input
|
|
14
|
+
* @param {string} separator
|
|
15
|
+
*/
|
|
16
|
+
export function splitAtTopLevelOnly(input, separator) {
|
|
17
|
+
let stack = []
|
|
18
|
+
let parts = []
|
|
19
|
+
let lastPos = 0
|
|
20
|
+
|
|
21
|
+
for (let idx = 0; idx < input.length; idx++) {
|
|
22
|
+
let char = input[idx]
|
|
23
|
+
|
|
24
|
+
if (stack.length === 0 && char === separator[0]) {
|
|
25
|
+
if (separator.length === 1 || input.slice(idx, idx + separator.length) === separator) {
|
|
26
|
+
parts.push(input.slice(lastPos, idx))
|
|
27
|
+
lastPos = idx + separator.length
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (char === '(' || char === '[' || char === '{') {
|
|
32
|
+
stack.push(char)
|
|
33
|
+
} else if (
|
|
34
|
+
(char === ')' && stack[stack.length - 1] === '(') ||
|
|
35
|
+
(char === ']' && stack[stack.length - 1] === '[') ||
|
|
36
|
+
(char === '}' && stack[stack.length - 1] === '{')
|
|
37
|
+
) {
|
|
38
|
+
stack.pop()
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
parts.push(input.slice(lastPos))
|
|
43
|
+
|
|
44
|
+
return parts
|
|
45
|
+
}
|
package/src/util/toPath.js
CHANGED
|
@@ -1,4 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parse a path string into an array of path segments.
|
|
3
|
+
*
|
|
4
|
+
* Square bracket notation `a[b]` may be used to "escape" dots that would otherwise be interpreted as path separators.
|
|
5
|
+
*
|
|
6
|
+
* Example:
|
|
7
|
+
* a -> ['a']
|
|
8
|
+
* a.b.c -> ['a', 'b', 'c']
|
|
9
|
+
* a[b].c -> ['a', 'b', 'c']
|
|
10
|
+
* a[b.c].e.f -> ['a', 'b.c', 'e', 'f']
|
|
11
|
+
* a[b][c][d] -> ['a', 'b', 'c', 'd']
|
|
12
|
+
*
|
|
13
|
+
* @param {string|string[]} path
|
|
14
|
+
**/
|
|
1
15
|
export function toPath(path) {
|
|
2
16
|
if (Array.isArray(path)) return path
|
|
3
|
-
|
|
17
|
+
|
|
18
|
+
let openBrackets = path.split('[').length - 1
|
|
19
|
+
let closedBrackets = path.split(']').length - 1
|
|
20
|
+
|
|
21
|
+
if (openBrackets !== closedBrackets) {
|
|
22
|
+
throw new Error(`Path is invalid. Has unbalanced brackets: ${path}`)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return path.split(/\.(?![^\[]*\])|[\[\]]/g).filter(Boolean)
|
|
4
26
|
}
|
|
@@ -1,13 +1,26 @@
|
|
|
1
1
|
import postcss from 'postcss'
|
|
2
|
+
import isPlainObject from './isPlainObject'
|
|
2
3
|
|
|
3
4
|
export default function transformThemeValue(themeSection) {
|
|
4
5
|
if (['fontSize', 'outline'].includes(themeSection)) {
|
|
5
|
-
return (value) =>
|
|
6
|
+
return (value) => {
|
|
7
|
+
if (typeof value === 'function') value = value({})
|
|
8
|
+
if (Array.isArray(value)) value = value[0]
|
|
9
|
+
|
|
10
|
+
return value
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
if (themeSection === 'fontFamily') {
|
|
15
|
+
return (value) => {
|
|
16
|
+
if (typeof value === 'function') value = value({})
|
|
17
|
+
let families = Array.isArray(value) && isPlainObject(value[1]) ? value[0] : value
|
|
18
|
+
return Array.isArray(families) ? families.join(', ') : families
|
|
19
|
+
}
|
|
6
20
|
}
|
|
7
21
|
|
|
8
22
|
if (
|
|
9
23
|
[
|
|
10
|
-
'fontFamily',
|
|
11
24
|
'boxShadow',
|
|
12
25
|
'transitionProperty',
|
|
13
26
|
'transitionDuration',
|
|
@@ -20,18 +33,30 @@ export default function transformThemeValue(themeSection) {
|
|
|
20
33
|
'animation',
|
|
21
34
|
].includes(themeSection)
|
|
22
35
|
) {
|
|
23
|
-
return (value) =>
|
|
36
|
+
return (value) => {
|
|
37
|
+
if (typeof value === 'function') value = value({})
|
|
38
|
+
if (Array.isArray(value)) value = value.join(', ')
|
|
39
|
+
|
|
40
|
+
return value
|
|
41
|
+
}
|
|
24
42
|
}
|
|
25
43
|
|
|
26
44
|
// For backwards compatibility reasons, before we switched to underscores
|
|
27
45
|
// instead of commas for arbitrary values.
|
|
28
46
|
if (['gridTemplateColumns', 'gridTemplateRows', 'objectPosition'].includes(themeSection)) {
|
|
29
|
-
return (value) =>
|
|
30
|
-
|
|
47
|
+
return (value) => {
|
|
48
|
+
if (typeof value === 'function') value = value({})
|
|
49
|
+
if (typeof value === 'string') value = postcss.list.comma(value).join(' ')
|
|
31
50
|
|
|
32
|
-
|
|
33
|
-
|
|
51
|
+
return value
|
|
52
|
+
}
|
|
34
53
|
}
|
|
35
54
|
|
|
36
|
-
return (value) =>
|
|
55
|
+
return (value, opts = {}) => {
|
|
56
|
+
if (typeof value === 'function') {
|
|
57
|
+
value = value(opts)
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return value
|
|
61
|
+
}
|
|
37
62
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import log from './log'
|
|
2
|
+
|
|
3
|
+
export function validateConfig(config) {
|
|
4
|
+
if (config.content.files.length === 0) {
|
|
5
|
+
log.warn('content-problems', [
|
|
6
|
+
'The `content` option in your Tailwind CSS configuration is missing or empty.',
|
|
7
|
+
'Configure your content sources or your generated CSS will be missing styles.',
|
|
8
|
+
'https://tailwindcss.com/docs/content-configuration',
|
|
9
|
+
])
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
return config
|
|
13
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { length, percentage } from './dataTypes'
|
|
2
|
+
import { splitAtTopLevelOnly } from './splitAtTopLevelOnly'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* https://developer.mozilla.org/en-US/docs/Web/CSS/background-size#formal_syntax
|
|
7
|
+
*
|
|
8
|
+
* background-size =
|
|
9
|
+
* <bg-size>#
|
|
10
|
+
*
|
|
11
|
+
* <bg-size> =
|
|
12
|
+
* [ <length-percentage [0,∞]> | auto ]{1,2} |
|
|
13
|
+
* cover |
|
|
14
|
+
* contain
|
|
15
|
+
*
|
|
16
|
+
* <length-percentage> =
|
|
17
|
+
* <length> |
|
|
18
|
+
* <percentage>
|
|
19
|
+
*
|
|
20
|
+
* @param {string} value
|
|
21
|
+
*/
|
|
22
|
+
export function backgroundSize(value) {
|
|
23
|
+
let keywordValues = ['cover', 'contain']
|
|
24
|
+
// the <length-percentage> type will probably be a css function
|
|
25
|
+
// so we have to use `splitAtTopLevelOnly`
|
|
26
|
+
return splitAtTopLevelOnly(value, ',').every((part) => {
|
|
27
|
+
let sizes = splitAtTopLevelOnly(part, '_').filter(Boolean)
|
|
28
|
+
if (sizes.length === 1 && keywordValues.includes(sizes[0])) return true
|
|
29
|
+
|
|
30
|
+
if (sizes.length !== 1 && sizes.length !== 2) return false
|
|
31
|
+
|
|
32
|
+
return sizes.every((size) => length(size) || percentage(size) || size === 'auto')
|
|
33
|
+
})
|
|
34
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** @type {import('tailwindcss').Config} */
|
|
1
2
|
module.exports = {
|
|
2
3
|
content: [],
|
|
3
4
|
presets: [],
|
|
@@ -111,21 +112,31 @@ module.exports = {
|
|
|
111
112
|
pulse: 'pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite',
|
|
112
113
|
bounce: 'bounce 1s infinite',
|
|
113
114
|
},
|
|
115
|
+
aria: {
|
|
116
|
+
checked: 'checked="true"',
|
|
117
|
+
disabled: 'disabled="true"',
|
|
118
|
+
expanded: 'expanded="true"',
|
|
119
|
+
hidden: 'hidden="true"',
|
|
120
|
+
pressed: 'pressed="true"',
|
|
121
|
+
readonly: 'readonly="true"',
|
|
122
|
+
required: 'required="true"',
|
|
123
|
+
selected: 'selected="true"',
|
|
124
|
+
},
|
|
114
125
|
aspectRatio: {
|
|
115
126
|
auto: 'auto',
|
|
116
127
|
square: '1 / 1',
|
|
117
128
|
video: '16 / 9',
|
|
118
129
|
},
|
|
119
|
-
backdropBlur: (theme) => theme('blur'),
|
|
120
|
-
backdropBrightness: (theme) => theme('brightness'),
|
|
121
|
-
backdropContrast: (theme) => theme('contrast'),
|
|
122
|
-
backdropGrayscale: (theme) => theme('grayscale'),
|
|
123
|
-
backdropHueRotate: (theme) => theme('hueRotate'),
|
|
124
|
-
backdropInvert: (theme) => theme('invert'),
|
|
125
|
-
backdropOpacity: (theme) => theme('opacity'),
|
|
126
|
-
backdropSaturate: (theme) => theme('saturate'),
|
|
127
|
-
backdropSepia: (theme) => theme('sepia'),
|
|
128
|
-
backgroundColor: (theme) => theme('colors'),
|
|
130
|
+
backdropBlur: ({ theme }) => theme('blur'),
|
|
131
|
+
backdropBrightness: ({ theme }) => theme('brightness'),
|
|
132
|
+
backdropContrast: ({ theme }) => theme('contrast'),
|
|
133
|
+
backdropGrayscale: ({ theme }) => theme('grayscale'),
|
|
134
|
+
backdropHueRotate: ({ theme }) => theme('hueRotate'),
|
|
135
|
+
backdropInvert: ({ theme }) => theme('invert'),
|
|
136
|
+
backdropOpacity: ({ theme }) => theme('opacity'),
|
|
137
|
+
backdropSaturate: ({ theme }) => theme('saturate'),
|
|
138
|
+
backdropSepia: ({ theme }) => theme('sepia'),
|
|
139
|
+
backgroundColor: ({ theme }) => theme('colors'),
|
|
129
140
|
backgroundImage: {
|
|
130
141
|
none: 'none',
|
|
131
142
|
'gradient-to-t': 'linear-gradient(to top, var(--tw-gradient-stops))',
|
|
@@ -137,7 +148,7 @@ module.exports = {
|
|
|
137
148
|
'gradient-to-l': 'linear-gradient(to left, var(--tw-gradient-stops))',
|
|
138
149
|
'gradient-to-tl': 'linear-gradient(to top left, var(--tw-gradient-stops))',
|
|
139
150
|
},
|
|
140
|
-
backgroundOpacity: (theme) => theme('opacity'),
|
|
151
|
+
backgroundOpacity: ({ theme }) => theme('opacity'),
|
|
141
152
|
backgroundPosition: {
|
|
142
153
|
bottom: 'bottom',
|
|
143
154
|
center: 'center',
|
|
@@ -178,11 +189,11 @@ module.exports = {
|
|
|
178
189
|
150: '1.5',
|
|
179
190
|
200: '2',
|
|
180
191
|
},
|
|
181
|
-
borderColor: (theme) => ({
|
|
192
|
+
borderColor: ({ theme }) => ({
|
|
182
193
|
...theme('colors'),
|
|
183
194
|
DEFAULT: theme('colors.gray.200', 'currentColor'),
|
|
184
195
|
}),
|
|
185
|
-
borderOpacity: (theme) => theme('opacity'),
|
|
196
|
+
borderOpacity: ({ theme }) => theme('opacity'),
|
|
186
197
|
borderRadius: {
|
|
187
198
|
none: '0px',
|
|
188
199
|
sm: '0.125rem',
|
|
@@ -194,6 +205,9 @@ module.exports = {
|
|
|
194
205
|
'3xl': '1.5rem',
|
|
195
206
|
full: '9999px',
|
|
196
207
|
},
|
|
208
|
+
borderSpacing: ({ theme }) => ({
|
|
209
|
+
...theme('spacing'),
|
|
210
|
+
}),
|
|
197
211
|
borderWidth: {
|
|
198
212
|
DEFAULT: '1px',
|
|
199
213
|
0: '0px',
|
|
@@ -203,16 +217,17 @@ module.exports = {
|
|
|
203
217
|
},
|
|
204
218
|
boxShadow: {
|
|
205
219
|
sm: '0 1px 2px 0 rgb(0 0 0 / 0.05)',
|
|
206
|
-
DEFAULT: '0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px
|
|
207
|
-
md: '0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -
|
|
208
|
-
lg: '0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -
|
|
209
|
-
xl: '0 20px 25px -5px rgb(0 0 0 / 0.1), 0
|
|
220
|
+
DEFAULT: '0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)',
|
|
221
|
+
md: '0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)',
|
|
222
|
+
lg: '0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)',
|
|
223
|
+
xl: '0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)',
|
|
210
224
|
'2xl': '0 25px 50px -12px rgb(0 0 0 / 0.25)',
|
|
211
|
-
inner: 'inset 0 2px 4px 0 rgb(0 0 0 / 0.
|
|
225
|
+
inner: 'inset 0 2px 4px 0 rgb(0 0 0 / 0.05)',
|
|
212
226
|
none: 'none',
|
|
213
227
|
},
|
|
214
|
-
|
|
215
|
-
|
|
228
|
+
boxShadowColor: ({ theme }) => theme('colors'),
|
|
229
|
+
caretColor: ({ theme }) => theme('colors'),
|
|
230
|
+
accentColor: ({ theme }) => ({
|
|
216
231
|
...theme('colors'),
|
|
217
232
|
auto: 'auto',
|
|
218
233
|
}),
|
|
@@ -238,10 +253,38 @@ module.exports = {
|
|
|
238
253
|
move: 'move',
|
|
239
254
|
help: 'help',
|
|
240
255
|
'not-allowed': 'not-allowed',
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
256
|
+
none: 'none',
|
|
257
|
+
'context-menu': 'context-menu',
|
|
258
|
+
progress: 'progress',
|
|
259
|
+
cell: 'cell',
|
|
260
|
+
crosshair: 'crosshair',
|
|
261
|
+
'vertical-text': 'vertical-text',
|
|
262
|
+
alias: 'alias',
|
|
263
|
+
copy: 'copy',
|
|
264
|
+
'no-drop': 'no-drop',
|
|
265
|
+
grab: 'grab',
|
|
266
|
+
grabbing: 'grabbing',
|
|
267
|
+
'all-scroll': 'all-scroll',
|
|
268
|
+
'col-resize': 'col-resize',
|
|
269
|
+
'row-resize': 'row-resize',
|
|
270
|
+
'n-resize': 'n-resize',
|
|
271
|
+
'e-resize': 'e-resize',
|
|
272
|
+
's-resize': 's-resize',
|
|
273
|
+
'w-resize': 'w-resize',
|
|
274
|
+
'ne-resize': 'ne-resize',
|
|
275
|
+
'nw-resize': 'nw-resize',
|
|
276
|
+
'se-resize': 'se-resize',
|
|
277
|
+
'sw-resize': 'sw-resize',
|
|
278
|
+
'ew-resize': 'ew-resize',
|
|
279
|
+
'ns-resize': 'ns-resize',
|
|
280
|
+
'nesw-resize': 'nesw-resize',
|
|
281
|
+
'nwse-resize': 'nwse-resize',
|
|
282
|
+
'zoom-in': 'zoom-in',
|
|
283
|
+
'zoom-out': 'zoom-out',
|
|
284
|
+
},
|
|
285
|
+
divideColor: ({ theme }) => theme('borderColor'),
|
|
286
|
+
divideOpacity: ({ theme }) => theme('borderOpacity'),
|
|
287
|
+
divideWidth: ({ theme }) => theme('borderWidth'),
|
|
245
288
|
dropShadow: {
|
|
246
289
|
sm: '0 1px 1px rgb(0 0 0 / 0.05)',
|
|
247
290
|
DEFAULT: ['0 1px 2px rgb(0 0 0 / 0.1)', '0 1px 1px rgb(0 0 0 / 0.06)'],
|
|
@@ -251,17 +294,15 @@ module.exports = {
|
|
|
251
294
|
'2xl': '0 25px 25px rgb(0 0 0 / 0.15)',
|
|
252
295
|
none: '0 0 #0000',
|
|
253
296
|
},
|
|
254
|
-
fill: {
|
|
297
|
+
fill: ({ theme }) => ({
|
|
298
|
+
none: 'none',
|
|
299
|
+
...theme('colors'),
|
|
300
|
+
}),
|
|
255
301
|
grayscale: {
|
|
256
302
|
0: '0',
|
|
257
303
|
DEFAULT: '100%',
|
|
258
304
|
},
|
|
259
305
|
hueRotate: {
|
|
260
|
-
'-180': '-180deg',
|
|
261
|
-
'-90': '-90deg',
|
|
262
|
-
'-60': '-60deg',
|
|
263
|
-
'-30': '-30deg',
|
|
264
|
-
'-15': '-15deg',
|
|
265
306
|
0: '0deg',
|
|
266
307
|
15: '15deg',
|
|
267
308
|
30: '30deg',
|
|
@@ -279,6 +320,37 @@ module.exports = {
|
|
|
279
320
|
initial: '0 1 auto',
|
|
280
321
|
none: 'none',
|
|
281
322
|
},
|
|
323
|
+
flexBasis: ({ theme }) => ({
|
|
324
|
+
auto: 'auto',
|
|
325
|
+
...theme('spacing'),
|
|
326
|
+
'1/2': '50%',
|
|
327
|
+
'1/3': '33.333333%',
|
|
328
|
+
'2/3': '66.666667%',
|
|
329
|
+
'1/4': '25%',
|
|
330
|
+
'2/4': '50%',
|
|
331
|
+
'3/4': '75%',
|
|
332
|
+
'1/5': '20%',
|
|
333
|
+
'2/5': '40%',
|
|
334
|
+
'3/5': '60%',
|
|
335
|
+
'4/5': '80%',
|
|
336
|
+
'1/6': '16.666667%',
|
|
337
|
+
'2/6': '33.333333%',
|
|
338
|
+
'3/6': '50%',
|
|
339
|
+
'4/6': '66.666667%',
|
|
340
|
+
'5/6': '83.333333%',
|
|
341
|
+
'1/12': '8.333333%',
|
|
342
|
+
'2/12': '16.666667%',
|
|
343
|
+
'3/12': '25%',
|
|
344
|
+
'4/12': '33.333333%',
|
|
345
|
+
'5/12': '41.666667%',
|
|
346
|
+
'6/12': '50%',
|
|
347
|
+
'7/12': '58.333333%',
|
|
348
|
+
'8/12': '66.666667%',
|
|
349
|
+
'9/12': '75%',
|
|
350
|
+
'10/12': '83.333333%',
|
|
351
|
+
'11/12': '91.666667%',
|
|
352
|
+
full: '100%',
|
|
353
|
+
}),
|
|
282
354
|
flexGrow: {
|
|
283
355
|
0: '0',
|
|
284
356
|
DEFAULT: '1',
|
|
@@ -342,8 +414,8 @@ module.exports = {
|
|
|
342
414
|
extrabold: '800',
|
|
343
415
|
black: '900',
|
|
344
416
|
},
|
|
345
|
-
gap: (theme) => theme('spacing'),
|
|
346
|
-
gradientColorStops: (theme) => theme('colors'),
|
|
417
|
+
gap: ({ theme }) => theme('spacing'),
|
|
418
|
+
gradientColorStops: ({ theme }) => theme('colors'),
|
|
347
419
|
gridAutoColumns: {
|
|
348
420
|
auto: 'auto',
|
|
349
421
|
min: 'min-content',
|
|
@@ -458,7 +530,7 @@ module.exports = {
|
|
|
458
530
|
5: 'repeat(5, minmax(0, 1fr))',
|
|
459
531
|
6: 'repeat(6, minmax(0, 1fr))',
|
|
460
532
|
},
|
|
461
|
-
height: (theme) => ({
|
|
533
|
+
height: ({ theme }) => ({
|
|
462
534
|
auto: 'auto',
|
|
463
535
|
...theme('spacing'),
|
|
464
536
|
'1/2': '50%',
|
|
@@ -478,11 +550,13 @@ module.exports = {
|
|
|
478
550
|
'5/6': '83.333333%',
|
|
479
551
|
full: '100%',
|
|
480
552
|
screen: '100vh',
|
|
553
|
+
min: 'min-content',
|
|
554
|
+
max: 'max-content',
|
|
555
|
+
fit: 'fit-content',
|
|
481
556
|
}),
|
|
482
|
-
inset: (
|
|
557
|
+
inset: ({ theme }) => ({
|
|
483
558
|
auto: 'auto',
|
|
484
559
|
...theme('spacing'),
|
|
485
|
-
...negative(theme('spacing')),
|
|
486
560
|
'1/2': '50%',
|
|
487
561
|
'1/3': '33.333333%',
|
|
488
562
|
'2/3': '66.666667%',
|
|
@@ -490,13 +564,6 @@ module.exports = {
|
|
|
490
564
|
'2/4': '50%',
|
|
491
565
|
'3/4': '75%',
|
|
492
566
|
full: '100%',
|
|
493
|
-
'-1/2': '-50%',
|
|
494
|
-
'-1/3': '-33.333333%',
|
|
495
|
-
'-2/3': '-66.666667%',
|
|
496
|
-
'-1/4': '-25%',
|
|
497
|
-
'-2/4': '-50%',
|
|
498
|
-
'-3/4': '-75%',
|
|
499
|
-
'-full': '-100%',
|
|
500
567
|
}),
|
|
501
568
|
keyframes: {
|
|
502
569
|
spin: {
|
|
@@ -555,17 +622,19 @@ module.exports = {
|
|
|
555
622
|
disc: 'disc',
|
|
556
623
|
decimal: 'decimal',
|
|
557
624
|
},
|
|
558
|
-
margin: (
|
|
625
|
+
margin: ({ theme }) => ({
|
|
559
626
|
auto: 'auto',
|
|
560
627
|
...theme('spacing'),
|
|
561
|
-
...negative(theme('spacing')),
|
|
562
628
|
}),
|
|
563
|
-
maxHeight: (theme) => ({
|
|
629
|
+
maxHeight: ({ theme }) => ({
|
|
564
630
|
...theme('spacing'),
|
|
565
631
|
full: '100%',
|
|
566
632
|
screen: '100vh',
|
|
633
|
+
min: 'min-content',
|
|
634
|
+
max: 'max-content',
|
|
635
|
+
fit: 'fit-content',
|
|
567
636
|
}),
|
|
568
|
-
maxWidth: (theme,
|
|
637
|
+
maxWidth: ({ theme, breakpoints }) => ({
|
|
569
638
|
none: 'none',
|
|
570
639
|
0: '0rem',
|
|
571
640
|
xs: '20rem',
|
|
@@ -582,6 +651,7 @@ module.exports = {
|
|
|
582
651
|
full: '100%',
|
|
583
652
|
min: 'min-content',
|
|
584
653
|
max: 'max-content',
|
|
654
|
+
fit: 'fit-content',
|
|
585
655
|
prose: '65ch',
|
|
586
656
|
...breakpoints(theme('screens')),
|
|
587
657
|
}),
|
|
@@ -589,12 +659,16 @@ module.exports = {
|
|
|
589
659
|
0: '0px',
|
|
590
660
|
full: '100%',
|
|
591
661
|
screen: '100vh',
|
|
662
|
+
min: 'min-content',
|
|
663
|
+
max: 'max-content',
|
|
664
|
+
fit: 'fit-content',
|
|
592
665
|
},
|
|
593
666
|
minWidth: {
|
|
594
667
|
0: '0px',
|
|
595
668
|
full: '100%',
|
|
596
669
|
min: 'min-content',
|
|
597
670
|
max: 'max-content',
|
|
671
|
+
fit: 'fit-content',
|
|
598
672
|
},
|
|
599
673
|
objectPosition: {
|
|
600
674
|
bottom: 'bottom',
|
|
@@ -641,19 +715,29 @@ module.exports = {
|
|
|
641
715
|
11: '11',
|
|
642
716
|
12: '12',
|
|
643
717
|
},
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
718
|
+
padding: ({ theme }) => theme('spacing'),
|
|
719
|
+
placeholderColor: ({ theme }) => theme('colors'),
|
|
720
|
+
placeholderOpacity: ({ theme }) => theme('opacity'),
|
|
721
|
+
outlineColor: ({ theme }) => theme('colors'),
|
|
722
|
+
outlineOffset: {
|
|
723
|
+
0: '0px',
|
|
724
|
+
1: '1px',
|
|
725
|
+
2: '2px',
|
|
726
|
+
4: '4px',
|
|
727
|
+
8: '8px',
|
|
728
|
+
},
|
|
729
|
+
outlineWidth: {
|
|
730
|
+
0: '0px',
|
|
731
|
+
1: '1px',
|
|
732
|
+
2: '2px',
|
|
733
|
+
4: '4px',
|
|
734
|
+
8: '8px',
|
|
648
735
|
},
|
|
649
|
-
|
|
650
|
-
placeholderColor: (theme) => theme('colors'),
|
|
651
|
-
placeholderOpacity: (theme) => theme('opacity'),
|
|
652
|
-
ringColor: (theme) => ({
|
|
736
|
+
ringColor: ({ theme }) => ({
|
|
653
737
|
DEFAULT: theme('colors.blue.500', '#3b82f6'),
|
|
654
738
|
...theme('colors'),
|
|
655
739
|
}),
|
|
656
|
-
ringOffsetColor: (theme) => theme('colors'),
|
|
740
|
+
ringOffsetColor: ({ theme }) => theme('colors'),
|
|
657
741
|
ringOffsetWidth: {
|
|
658
742
|
0: '0px',
|
|
659
743
|
1: '1px',
|
|
@@ -661,7 +745,7 @@ module.exports = {
|
|
|
661
745
|
4: '4px',
|
|
662
746
|
8: '8px',
|
|
663
747
|
},
|
|
664
|
-
ringOpacity: (theme) => ({
|
|
748
|
+
ringOpacity: ({ theme }) => ({
|
|
665
749
|
DEFAULT: '0.5',
|
|
666
750
|
...theme('opacity'),
|
|
667
751
|
}),
|
|
@@ -674,14 +758,6 @@ module.exports = {
|
|
|
674
758
|
8: '8px',
|
|
675
759
|
},
|
|
676
760
|
rotate: {
|
|
677
|
-
'-180': '-180deg',
|
|
678
|
-
'-90': '-90deg',
|
|
679
|
-
'-45': '-45deg',
|
|
680
|
-
'-12': '-12deg',
|
|
681
|
-
'-6': '-6deg',
|
|
682
|
-
'-3': '-3deg',
|
|
683
|
-
'-2': '-2deg',
|
|
684
|
-
'-1': '-1deg',
|
|
685
761
|
0: '0deg',
|
|
686
762
|
1: '1deg',
|
|
687
763
|
2: '2deg',
|
|
@@ -711,21 +787,15 @@ module.exports = {
|
|
|
711
787
|
125: '1.25',
|
|
712
788
|
150: '1.5',
|
|
713
789
|
},
|
|
714
|
-
scrollMargin: (
|
|
790
|
+
scrollMargin: ({ theme }) => ({
|
|
715
791
|
...theme('spacing'),
|
|
716
|
-
...negative(theme('spacing')),
|
|
717
792
|
}),
|
|
718
|
-
scrollPadding: (theme) => theme('spacing'),
|
|
793
|
+
scrollPadding: ({ theme }) => theme('spacing'),
|
|
719
794
|
sepia: {
|
|
720
795
|
0: '0',
|
|
721
796
|
DEFAULT: '100%',
|
|
722
797
|
},
|
|
723
798
|
skew: {
|
|
724
|
-
'-12': '-12deg',
|
|
725
|
-
'-6': '-6deg',
|
|
726
|
-
'-3': '-3deg',
|
|
727
|
-
'-2': '-2deg',
|
|
728
|
-
'-1': '-1deg',
|
|
729
799
|
0: '0deg',
|
|
730
800
|
1: '1deg',
|
|
731
801
|
2: '2deg',
|
|
@@ -733,24 +803,41 @@ module.exports = {
|
|
|
733
803
|
6: '6deg',
|
|
734
804
|
12: '12deg',
|
|
735
805
|
},
|
|
736
|
-
space: (
|
|
806
|
+
space: ({ theme }) => ({
|
|
737
807
|
...theme('spacing'),
|
|
738
|
-
...negative(theme('spacing')),
|
|
739
808
|
}),
|
|
740
|
-
stroke: {
|
|
741
|
-
|
|
742
|
-
|
|
809
|
+
stroke: ({ theme }) => ({
|
|
810
|
+
none: 'none',
|
|
811
|
+
...theme('colors'),
|
|
812
|
+
}),
|
|
743
813
|
strokeWidth: {
|
|
744
814
|
0: '0',
|
|
745
815
|
1: '1',
|
|
746
816
|
2: '2',
|
|
747
817
|
},
|
|
748
|
-
textColor: (theme) => theme('colors'),
|
|
749
|
-
|
|
818
|
+
textColor: ({ theme }) => theme('colors'),
|
|
819
|
+
textDecorationColor: ({ theme }) => theme('colors'),
|
|
820
|
+
textDecorationThickness: {
|
|
821
|
+
auto: 'auto',
|
|
822
|
+
'from-font': 'from-font',
|
|
823
|
+
0: '0px',
|
|
824
|
+
1: '1px',
|
|
825
|
+
2: '2px',
|
|
826
|
+
4: '4px',
|
|
827
|
+
8: '8px',
|
|
828
|
+
},
|
|
829
|
+
textUnderlineOffset: {
|
|
830
|
+
auto: 'auto',
|
|
831
|
+
0: '0px',
|
|
832
|
+
1: '1px',
|
|
833
|
+
2: '2px',
|
|
834
|
+
4: '4px',
|
|
835
|
+
8: '8px',
|
|
836
|
+
},
|
|
837
|
+
textIndent: ({ theme }) => ({
|
|
750
838
|
...theme('spacing'),
|
|
751
|
-
...negative(theme('spacing')),
|
|
752
839
|
}),
|
|
753
|
-
textOpacity: (theme) => theme('opacity'),
|
|
840
|
+
textOpacity: ({ theme }) => theme('opacity'),
|
|
754
841
|
transformOrigin: {
|
|
755
842
|
center: 'center',
|
|
756
843
|
top: 'top',
|
|
@@ -787,8 +874,8 @@ module.exports = {
|
|
|
787
874
|
none: 'none',
|
|
788
875
|
all: 'all',
|
|
789
876
|
DEFAULT:
|
|
790
|
-
'background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter',
|
|
791
|
-
colors: 'background-color, border-color, color, fill, stroke',
|
|
877
|
+
'color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter',
|
|
878
|
+
colors: 'color, background-color, border-color, text-decoration-color, fill, stroke',
|
|
792
879
|
opacity: 'opacity',
|
|
793
880
|
shadow: 'box-shadow',
|
|
794
881
|
transform: 'transform',
|
|
@@ -800,9 +887,8 @@ module.exports = {
|
|
|
800
887
|
out: 'cubic-bezier(0, 0, 0.2, 1)',
|
|
801
888
|
'in-out': 'cubic-bezier(0.4, 0, 0.2, 1)',
|
|
802
889
|
},
|
|
803
|
-
translate: (
|
|
890
|
+
translate: ({ theme }) => ({
|
|
804
891
|
...theme('spacing'),
|
|
805
|
-
...negative(theme('spacing')),
|
|
806
892
|
'1/2': '50%',
|
|
807
893
|
'1/3': '33.333333%',
|
|
808
894
|
'2/3': '66.666667%',
|
|
@@ -810,15 +896,8 @@ module.exports = {
|
|
|
810
896
|
'2/4': '50%',
|
|
811
897
|
'3/4': '75%',
|
|
812
898
|
full: '100%',
|
|
813
|
-
'-1/2': '-50%',
|
|
814
|
-
'-1/3': '-33.333333%',
|
|
815
|
-
'-2/3': '-66.666667%',
|
|
816
|
-
'-1/4': '-25%',
|
|
817
|
-
'-2/4': '-50%',
|
|
818
|
-
'-3/4': '-75%',
|
|
819
|
-
'-full': '-100%',
|
|
820
899
|
}),
|
|
821
|
-
width: (theme) => ({
|
|
900
|
+
width: ({ theme }) => ({
|
|
822
901
|
auto: 'auto',
|
|
823
902
|
...theme('spacing'),
|
|
824
903
|
'1/2': '50%',
|
|
@@ -851,6 +930,7 @@ module.exports = {
|
|
|
851
930
|
screen: '100vw',
|
|
852
931
|
min: 'min-content',
|
|
853
932
|
max: 'max-content',
|
|
933
|
+
fit: 'fit-content',
|
|
854
934
|
}),
|
|
855
935
|
willChange: {
|
|
856
936
|
auto: 'auto',
|