tailwindcss 3.2.6 → 3.3.0

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.
Files changed (83) hide show
  1. package/CHANGELOG.md +52 -8
  2. package/lib/cli/build/index.js +7 -3
  3. package/lib/cli/build/plugin.js +28 -19
  4. package/lib/cli/build/watching.js +4 -2
  5. package/lib/cli/index.js +12 -21
  6. package/lib/cli/init/index.js +21 -6
  7. package/lib/corePluginList.js +4 -0
  8. package/lib/corePlugins.js +282 -26
  9. package/lib/css/preflight.css +2 -0
  10. package/lib/featureFlags.js +8 -1
  11. package/lib/lib/expandApplyAtRules.js +2 -1
  12. package/lib/lib/generateRules.js +20 -16
  13. package/lib/lib/getModuleDependencies.js +79 -33
  14. package/lib/lib/load-config.js +36 -0
  15. package/lib/lib/setupContextUtils.js +10 -2
  16. package/lib/lib/setupTrackingContext.js +4 -4
  17. package/lib/oxide/cli/build/index.js +7 -3
  18. package/lib/oxide/cli/build/plugin.js +27 -18
  19. package/lib/oxide/cli/build/watching.js +1 -1
  20. package/lib/oxide/cli/index.js +10 -16
  21. package/lib/oxide/cli/init/index.js +19 -4
  22. package/lib/public/colors.js +44 -22
  23. package/lib/public/default-config.js +2 -2
  24. package/lib/public/default-theme.js +2 -2
  25. package/lib/public/load-config.js +10 -0
  26. package/lib/util/applyImportantSelector.js +22 -0
  27. package/lib/util/dataTypes.js +3 -0
  28. package/lib/util/formatVariantSelector.js +2 -12
  29. package/lib/util/getAllConfigs.js +2 -2
  30. package/lib/util/normalizeConfig.js +16 -3
  31. package/lib/util/pluginUtils.js +14 -26
  32. package/lib/util/resolveConfigPath.js +19 -7
  33. package/lib/util/splitAtTopLevelOnly.js +7 -1
  34. package/loadConfig.d.ts +4 -0
  35. package/loadConfig.js +2 -0
  36. package/package.json +5 -4
  37. package/src/cli/build/index.js +7 -7
  38. package/src/cli/build/plugin.js +28 -23
  39. package/src/cli/build/watching.js +4 -2
  40. package/src/cli/index.js +8 -26
  41. package/src/cli/init/index.js +37 -8
  42. package/src/corePluginList.js +1 -1
  43. package/src/corePlugins.js +184 -27
  44. package/src/css/preflight.css +2 -0
  45. package/src/featureFlags.js +7 -0
  46. package/src/lib/expandApplyAtRules.js +2 -1
  47. package/src/lib/generateRules.js +35 -15
  48. package/src/lib/getModuleDependencies.js +70 -30
  49. package/src/lib/load-config.ts +27 -0
  50. package/src/lib/setupContextUtils.js +9 -2
  51. package/src/lib/setupTrackingContext.js +4 -4
  52. package/src/oxide/cli/build/index.ts +7 -7
  53. package/src/oxide/cli/build/plugin.ts +28 -22
  54. package/src/oxide/cli/build/watching.ts +1 -1
  55. package/src/oxide/cli/index.ts +7 -15
  56. package/src/oxide/cli/init/index.ts +34 -7
  57. package/src/public/colors.js +22 -0
  58. package/src/public/default-config.js +1 -1
  59. package/src/public/default-theme.js +2 -2
  60. package/src/public/load-config.js +2 -0
  61. package/src/util/applyImportantSelector.js +19 -0
  62. package/src/util/dataTypes.js +4 -0
  63. package/src/util/formatVariantSelector.js +1 -1
  64. package/src/util/getAllConfigs.js +2 -2
  65. package/src/util/normalizeConfig.js +19 -1
  66. package/src/util/pluginUtils.js +20 -31
  67. package/src/util/resolveConfigPath.js +12 -1
  68. package/src/util/splitAtTopLevelOnly.js +8 -1
  69. package/stubs/.gitignore +1 -0
  70. package/stubs/.prettierrc.json +6 -0
  71. package/stubs/{defaultConfig.stub.js → config.full.js} +38 -3
  72. package/stubs/{simpleConfig.stub.js → config.simple.js} +0 -1
  73. package/stubs/postcss.config.js +6 -0
  74. package/stubs/tailwind.config.cjs +2 -0
  75. package/stubs/tailwind.config.js +2 -0
  76. package/stubs/tailwind.config.ts +3 -0
  77. package/types/config.d.ts +7 -1
  78. package/types/generated/colors.d.ts +22 -0
  79. package/types/generated/corePluginList.d.ts +1 -1
  80. package/types/generated/default-theme.d.ts +31 -2
  81. package/lib/constants.js +0 -44
  82. package/src/constants.js +0 -17
  83. /package/stubs/{defaultPostCssConfig.stub.js → postcss.config.cjs} +0 -0
@@ -1,8 +1,8 @@
1
- import defaultConfig from '../../stubs/defaultConfig.stub.js'
1
+ import defaultFullConfig from '../../stubs/config.full.js'
2
2
  import { flagEnabled } from '../featureFlags'
3
3
 
4
4
  export default function getAllConfigs(config) {
5
- const configs = (config?.presets ?? [defaultConfig])
5
+ const configs = (config?.presets ?? [defaultFullConfig])
6
6
  .slice()
7
7
  .reverse()
8
8
  .flatMap((preset) => getAllConfigs(preset instanceof Function ? preset() : preset))
@@ -1,3 +1,4 @@
1
+ import { flagEnabled } from '../featureFlags'
1
2
  import log, { dim } from './log'
2
3
 
3
4
  export function normalizeConfig(config) {
@@ -189,7 +190,7 @@ export function normalizeConfig(config) {
189
190
  return content.relative
190
191
  }
191
192
 
192
- return config.future?.relativeContentPathsByDefault ?? false
193
+ return flagEnabled(config, 'relativeContentPathsByDefault')
193
194
  })(),
194
195
 
195
196
  files: (() => {
@@ -296,5 +297,22 @@ export function normalizeConfig(config) {
296
297
  }
297
298
  }
298
299
 
300
+ // Warn if the line-clamp plugin is installed
301
+ if (config.plugins.length > 0) {
302
+ let plugin
303
+ try {
304
+ plugin = require('@tailwindcss/line-clamp')
305
+ } catch {}
306
+
307
+ if (plugin && config.plugins.includes(plugin)) {
308
+ log.warn('line-clamp-in-core', [
309
+ 'As of Tailwind CSS v3.3, the `@tailwindcss/line-clamp` plugin is now included by default.',
310
+ 'Remove it from the `plugins` array in your configuration to eliminate this warning.',
311
+ ])
312
+
313
+ config.plugins = config.plugins.filter((p) => p !== plugin)
314
+ }
315
+ }
316
+
299
317
  return config
300
318
  }
@@ -1,4 +1,3 @@
1
- import selectorParser from 'postcss-selector-parser'
2
1
  import escapeCommas from './escapeCommas'
3
2
  import { withAlphaValue } from './withAlphaVariable'
4
3
  import {
@@ -21,37 +20,19 @@ import negateValue from './negateValue'
21
20
  import { backgroundSize } from './validateFormalSyntax'
22
21
  import { flagEnabled } from '../featureFlags.js'
23
22
 
23
+ /**
24
+ * @param {import('postcss-selector-parser').Container} selectors
25
+ * @param {(className: string) => string} updateClass
26
+ * @returns {string}
27
+ */
24
28
  export function updateAllClasses(selectors, updateClass) {
25
- let parser = selectorParser((selectors) => {
26
- selectors.walkClasses((sel) => {
27
- let updatedClass = updateClass(sel.value)
28
- sel.value = updatedClass
29
- if (sel.raws && sel.raws.value) {
30
- sel.raws.value = escapeCommas(sel.raws.value)
31
- }
32
- })
33
- })
34
-
35
- let result = parser.processSync(selectors)
36
-
37
- return result
38
- }
29
+ selectors.walkClasses((sel) => {
30
+ sel.value = updateClass(sel.value)
39
31
 
40
- export function filterSelectorsForClass(selectors, classCandidate) {
41
- let parser = selectorParser((selectors) => {
42
- selectors.each((sel) => {
43
- const containsClass = sel.nodes.some(
44
- (node) => node.type === 'class' && node.value === classCandidate
45
- )
46
- if (!containsClass) {
47
- sel.remove()
48
- }
49
- })
32
+ if (sel.raws && sel.raws.value) {
33
+ sel.raws.value = escapeCommas(sel.raws.value)
34
+ }
50
35
  })
51
-
52
- let result = parser.processSync(selectors)
53
-
54
- return result
55
36
  }
56
37
 
57
38
  function resolveArbitraryValue(modifier, validate) {
@@ -133,6 +114,14 @@ export function parseColorFormat(value) {
133
114
  return value
134
115
  }
135
116
 
117
+ function unwrapArbitraryModifier(modifier) {
118
+ modifier = modifier.slice(1, -1)
119
+ if (modifier.startsWith('--')) {
120
+ modifier = `var(${modifier})`
121
+ }
122
+ return modifier
123
+ }
124
+
136
125
  export function asColor(modifier, options = {}, { tailwindConfig = {} } = {}) {
137
126
  if (options.values?.[modifier] !== undefined) {
138
127
  return parseColorFormat(options.values?.[modifier])
@@ -153,7 +142,7 @@ export function asColor(modifier, options = {}, { tailwindConfig = {} } = {}) {
153
142
  normalizedColor = parseColorFormat(normalizedColor)
154
143
 
155
144
  if (isArbitraryValue(alpha)) {
156
- return withAlphaValue(normalizedColor, alpha.slice(1, -1))
145
+ return withAlphaValue(normalizedColor, unwrapArbitraryModifier(alpha))
157
146
  }
158
147
 
159
148
  if (tailwindConfig.theme?.opacity?.[alpha] === undefined) {
@@ -287,7 +276,7 @@ export function* getMatchingTypes(types, rawModifier, options, tailwindConfig) {
287
276
  if (configValue !== null) {
288
277
  utilityModifier = configValue
289
278
  } else if (isArbitraryValue(utilityModifier)) {
290
- utilityModifier = utilityModifier.slice(1, -1)
279
+ utilityModifier = unwrapArbitraryModifier(utilityModifier)
291
280
  }
292
281
  }
293
282
  }
@@ -1,6 +1,13 @@
1
1
  import fs from 'fs'
2
2
  import path from 'path'
3
3
 
4
+ const defaultConfigFiles = [
5
+ './tailwind.config.js',
6
+ './tailwind.config.cjs',
7
+ './tailwind.config.mjs',
8
+ './tailwind.config.ts',
9
+ ]
10
+
4
11
  function isObject(value) {
5
12
  return typeof value === 'object' && value !== null
6
13
  }
@@ -43,7 +50,11 @@ export default function resolveConfigPath(pathOrConfig) {
43
50
  }
44
51
 
45
52
  // require('tailwindcss')
46
- for (const configFile of ['./tailwind.config.js', './tailwind.config.cjs']) {
53
+ return resolveDefaultConfigPath()
54
+ }
55
+
56
+ export function resolveDefaultConfigPath() {
57
+ for (const configFile of defaultConfigFiles) {
47
58
  try {
48
59
  const configPath = path.resolve(configFile)
49
60
  fs.accessSync(configPath)
@@ -17,17 +17,24 @@ export function splitAtTopLevelOnly(input, separator) {
17
17
  let stack = []
18
18
  let parts = []
19
19
  let lastPos = 0
20
+ let isEscaped = false
20
21
 
21
22
  for (let idx = 0; idx < input.length; idx++) {
22
23
  let char = input[idx]
23
24
 
24
- if (stack.length === 0 && char === separator[0]) {
25
+ if (stack.length === 0 && char === separator[0] && !isEscaped) {
25
26
  if (separator.length === 1 || input.slice(idx, idx + separator.length) === separator) {
26
27
  parts.push(input.slice(lastPos, idx))
27
28
  lastPos = idx + separator.length
28
29
  }
29
30
  }
30
31
 
32
+ if (isEscaped) {
33
+ isEscaped = false
34
+ } else if (char === '\\') {
35
+ isEscaped = true
36
+ }
37
+
31
38
  if (char === '(' || char === '[' || char === '{') {
32
39
  stack.push(char)
33
40
  } else if (
@@ -0,0 +1 @@
1
+ !*
@@ -0,0 +1,6 @@
1
+ {
2
+ "printWidth": 120,
3
+ "semi": false,
4
+ "singleQuote": true,
5
+ "trailingComma": "es5"
6
+ }
@@ -1,4 +1,3 @@
1
- /** @type {import('tailwindcss').Config} */
2
1
  module.exports = {
3
2
  content: [],
4
3
  presets: [],
@@ -356,6 +355,29 @@ module.exports = {
356
355
  },
357
356
  gap: ({ theme }) => theme('spacing'),
358
357
  gradientColorStops: ({ theme }) => theme('colors'),
358
+ gradientColorStopPositions: {
359
+ '0%': '0%',
360
+ '5%': '5%',
361
+ '10%': '10%',
362
+ '15%': '15%',
363
+ '20%': '20%',
364
+ '25%': '25%',
365
+ '30%': '30%',
366
+ '35%': '35%',
367
+ '40%': '40%',
368
+ '45%': '45%',
369
+ '50%': '50%',
370
+ '55%': '55%',
371
+ '60%': '60%',
372
+ '65%': '65%',
373
+ '70%': '70%',
374
+ '75%': '75%',
375
+ '80%': '80%',
376
+ '85%': '85%',
377
+ '90%': '90%',
378
+ '95%': '95%',
379
+ '100%': '100%',
380
+ },
359
381
  grayscale: {
360
382
  0: '0',
361
383
  DEFAULT: '100%',
@@ -578,10 +600,21 @@ module.exports = {
578
600
  disc: 'disc',
579
601
  decimal: 'decimal',
580
602
  },
603
+ listStyleImage: {
604
+ none: 'none',
605
+ },
581
606
  margin: ({ theme }) => ({
582
607
  auto: 'auto',
583
608
  ...theme('spacing'),
584
609
  }),
610
+ lineClamp: {
611
+ 1: '1',
612
+ 2: '2',
613
+ 3: '3',
614
+ 4: '4',
615
+ 5: '5',
616
+ 6: '6',
617
+ },
585
618
  maxHeight: ({ theme }) => ({
586
619
  ...theme('spacing'),
587
620
  none: 'none',
@@ -853,6 +886,7 @@ module.exports = {
853
886
  'top-left': 'top left',
854
887
  },
855
888
  transitionDelay: {
889
+ 0: '0s',
856
890
  75: '75ms',
857
891
  100: '100ms',
858
892
  150: '150ms',
@@ -864,6 +898,7 @@ module.exports = {
864
898
  },
865
899
  transitionDuration: {
866
900
  DEFAULT: '150ms',
901
+ 0: '0s',
867
902
  75: '75ms',
868
903
  100: '100ms',
869
904
  150: '150ms',
@@ -877,8 +912,8 @@ module.exports = {
877
912
  none: 'none',
878
913
  all: 'all',
879
914
  DEFAULT:
880
- 'color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter',
881
- colors: 'color, background-color, border-color, outline-color, text-decoration-color, fill, stroke',
915
+ 'color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter',
916
+ colors: 'color, background-color, border-color, text-decoration-color, fill, stroke',
882
917
  opacity: 'opacity',
883
918
  shadow: 'box-shadow',
884
919
  transform: 'transform',
@@ -1,4 +1,3 @@
1
- /** @type {import('tailwindcss').Config} */
2
1
  module.exports = {
3
2
  content: [],
4
3
  theme: {
@@ -0,0 +1,6 @@
1
+ export default {
2
+ plugins: {
3
+ tailwindcss: {},
4
+ autoprefixer: {},
5
+ },
6
+ }
@@ -0,0 +1,2 @@
1
+ /** @type {import('tailwindcss').Config} */
2
+ module.exports = __CONFIG__
@@ -0,0 +1,2 @@
1
+ /** @type {import('tailwindcss').Config} */
2
+ export default __CONFIG__
@@ -0,0 +1,3 @@
1
+ import type { Config } from 'tailwindcss'
2
+
3
+ export default __CONFIG__ satisfies Config
package/types/config.d.ts CHANGED
@@ -168,7 +168,13 @@ interface ThemeConfig {
168
168
  string,
169
169
  | string
170
170
  | string[]
171
- | [fontFamily: string | string[], configuration: Partial<{ fontFeatureSettings: string }>]
171
+ | [
172
+ fontFamily: string | string[],
173
+ configuration: Partial<{
174
+ fontFeatureSettings: string
175
+ fontVariationSettings: string
176
+ }>
177
+ ]
172
178
  >
173
179
  >
174
180
  fontSize: ResolvableTo<
@@ -15,6 +15,7 @@ export interface DefaultColors {
15
15
  '700': '#334155'
16
16
  '800': '#1e293b'
17
17
  '900': '#0f172a'
18
+ '950': '#020617'
18
19
  }
19
20
  gray: {
20
21
  '50': '#f9fafb'
@@ -27,6 +28,7 @@ export interface DefaultColors {
27
28
  '700': '#374151'
28
29
  '800': '#1f2937'
29
30
  '900': '#111827'
31
+ '950': '#030712'
30
32
  }
31
33
  zinc: {
32
34
  '50': '#fafafa'
@@ -39,6 +41,7 @@ export interface DefaultColors {
39
41
  '700': '#3f3f46'
40
42
  '800': '#27272a'
41
43
  '900': '#18181b'
44
+ '950': '#09090b'
42
45
  }
43
46
  neutral: {
44
47
  '50': '#fafafa'
@@ -51,6 +54,7 @@ export interface DefaultColors {
51
54
  '700': '#404040'
52
55
  '800': '#262626'
53
56
  '900': '#171717'
57
+ '950': '#0a0a0a'
54
58
  }
55
59
  stone: {
56
60
  '50': '#fafaf9'
@@ -63,6 +67,7 @@ export interface DefaultColors {
63
67
  '700': '#44403c'
64
68
  '800': '#292524'
65
69
  '900': '#1c1917'
70
+ '950': '#0c0a09'
66
71
  }
67
72
  red: {
68
73
  '50': '#fef2f2'
@@ -75,6 +80,7 @@ export interface DefaultColors {
75
80
  '700': '#b91c1c'
76
81
  '800': '#991b1b'
77
82
  '900': '#7f1d1d'
83
+ '950': '#450a0a'
78
84
  }
79
85
  orange: {
80
86
  '50': '#fff7ed'
@@ -87,6 +93,7 @@ export interface DefaultColors {
87
93
  '700': '#c2410c'
88
94
  '800': '#9a3412'
89
95
  '900': '#7c2d12'
96
+ '950': '#431407'
90
97
  }
91
98
  amber: {
92
99
  '50': '#fffbeb'
@@ -99,6 +106,7 @@ export interface DefaultColors {
99
106
  '700': '#b45309'
100
107
  '800': '#92400e'
101
108
  '900': '#78350f'
109
+ '950': '#451a03'
102
110
  }
103
111
  yellow: {
104
112
  '50': '#fefce8'
@@ -111,6 +119,7 @@ export interface DefaultColors {
111
119
  '700': '#a16207'
112
120
  '800': '#854d0e'
113
121
  '900': '#713f12'
122
+ '950': '#422006'
114
123
  }
115
124
  lime: {
116
125
  '50': '#f7fee7'
@@ -123,6 +132,7 @@ export interface DefaultColors {
123
132
  '700': '#4d7c0f'
124
133
  '800': '#3f6212'
125
134
  '900': '#365314'
135
+ '950': '#1a2e05'
126
136
  }
127
137
  green: {
128
138
  '50': '#f0fdf4'
@@ -135,6 +145,7 @@ export interface DefaultColors {
135
145
  '700': '#15803d'
136
146
  '800': '#166534'
137
147
  '900': '#14532d'
148
+ '950': '#052e16'
138
149
  }
139
150
  emerald: {
140
151
  '50': '#ecfdf5'
@@ -147,6 +158,7 @@ export interface DefaultColors {
147
158
  '700': '#047857'
148
159
  '800': '#065f46'
149
160
  '900': '#064e3b'
161
+ '950': '#022c22'
150
162
  }
151
163
  teal: {
152
164
  '50': '#f0fdfa'
@@ -159,6 +171,7 @@ export interface DefaultColors {
159
171
  '700': '#0f766e'
160
172
  '800': '#115e59'
161
173
  '900': '#134e4a'
174
+ '950': '#042f2e'
162
175
  }
163
176
  cyan: {
164
177
  '50': '#ecfeff'
@@ -171,6 +184,7 @@ export interface DefaultColors {
171
184
  '700': '#0e7490'
172
185
  '800': '#155e75'
173
186
  '900': '#164e63'
187
+ '950': '#083344'
174
188
  }
175
189
  sky: {
176
190
  '50': '#f0f9ff'
@@ -183,6 +197,7 @@ export interface DefaultColors {
183
197
  '700': '#0369a1'
184
198
  '800': '#075985'
185
199
  '900': '#0c4a6e'
200
+ '950': '#082f49'
186
201
  }
187
202
  blue: {
188
203
  '50': '#eff6ff'
@@ -195,6 +210,7 @@ export interface DefaultColors {
195
210
  '700': '#1d4ed8'
196
211
  '800': '#1e40af'
197
212
  '900': '#1e3a8a'
213
+ '950': '#172554'
198
214
  }
199
215
  indigo: {
200
216
  '50': '#eef2ff'
@@ -207,6 +223,7 @@ export interface DefaultColors {
207
223
  '700': '#4338ca'
208
224
  '800': '#3730a3'
209
225
  '900': '#312e81'
226
+ '950': '#1e1b4b'
210
227
  }
211
228
  violet: {
212
229
  '50': '#f5f3ff'
@@ -219,6 +236,7 @@ export interface DefaultColors {
219
236
  '700': '#6d28d9'
220
237
  '800': '#5b21b6'
221
238
  '900': '#4c1d95'
239
+ '950': '#2e1065'
222
240
  }
223
241
  purple: {
224
242
  '50': '#faf5ff'
@@ -231,6 +249,7 @@ export interface DefaultColors {
231
249
  '700': '#7e22ce'
232
250
  '800': '#6b21a8'
233
251
  '900': '#581c87'
252
+ '950': '#3b0764'
234
253
  }
235
254
  fuchsia: {
236
255
  '50': '#fdf4ff'
@@ -243,6 +262,7 @@ export interface DefaultColors {
243
262
  '700': '#a21caf'
244
263
  '800': '#86198f'
245
264
  '900': '#701a75'
265
+ '950': '#4a044e'
246
266
  }
247
267
  pink: {
248
268
  '50': '#fdf2f8'
@@ -255,6 +275,7 @@ export interface DefaultColors {
255
275
  '700': '#be185d'
256
276
  '800': '#9d174d'
257
277
  '900': '#831843'
278
+ '950': '#500724'
258
279
  }
259
280
  rose: {
260
281
  '50': '#fff1f2'
@@ -267,6 +288,7 @@ export interface DefaultColors {
267
288
  '700': '#be123c'
268
289
  '800': '#9f1239'
269
290
  '900': '#881337'
291
+ '950': '#4c0519'
270
292
  }
271
293
  /** @deprecated As of Tailwind CSS v2.2, `lightBlue` has been renamed to `sky`. Update your configuration file to silence this warning. */ lightBlue: DefaultColors['sky']
272
294
  /** @deprecated As of Tailwind CSS v3.0, `warmGray` has been renamed to `stone`. Update your configuration file to silence this warning. */ warmGray: DefaultColors['stone']
@@ -1 +1 @@
1
- export type CorePluginList = 'preflight' | 'container' | 'accessibility' | 'pointerEvents' | 'visibility' | 'position' | 'inset' | 'isolation' | 'zIndex' | 'order' | 'gridColumn' | 'gridColumnStart' | 'gridColumnEnd' | 'gridRow' | 'gridRowStart' | 'gridRowEnd' | 'float' | 'clear' | 'margin' | 'boxSizing' | 'display' | 'aspectRatio' | 'height' | 'maxHeight' | 'minHeight' | 'width' | 'minWidth' | 'maxWidth' | 'flex' | 'flexShrink' | 'flexGrow' | 'flexBasis' | 'tableLayout' | 'borderCollapse' | 'borderSpacing' | 'transformOrigin' | 'translate' | 'rotate' | 'skew' | 'scale' | 'transform' | 'animation' | 'cursor' | 'touchAction' | 'userSelect' | 'resize' | 'scrollSnapType' | 'scrollSnapAlign' | 'scrollSnapStop' | 'scrollMargin' | 'scrollPadding' | 'listStylePosition' | 'listStyleType' | 'appearance' | 'columns' | 'breakBefore' | 'breakInside' | 'breakAfter' | 'gridAutoColumns' | 'gridAutoFlow' | 'gridAutoRows' | 'gridTemplateColumns' | 'gridTemplateRows' | 'flexDirection' | 'flexWrap' | 'placeContent' | 'placeItems' | 'alignContent' | 'alignItems' | 'justifyContent' | 'justifyItems' | 'gap' | 'space' | 'divideWidth' | 'divideStyle' | 'divideColor' | 'divideOpacity' | 'placeSelf' | 'alignSelf' | 'justifySelf' | 'overflow' | 'overscrollBehavior' | 'scrollBehavior' | 'textOverflow' | 'whitespace' | 'wordBreak' | 'borderRadius' | 'borderWidth' | 'borderStyle' | 'borderColor' | 'borderOpacity' | 'backgroundColor' | 'backgroundOpacity' | 'backgroundImage' | 'gradientColorStops' | 'boxDecorationBreak' | 'backgroundSize' | 'backgroundAttachment' | 'backgroundClip' | 'backgroundPosition' | 'backgroundRepeat' | 'backgroundOrigin' | 'fill' | 'stroke' | 'strokeWidth' | 'objectFit' | 'objectPosition' | 'padding' | 'textAlign' | 'textIndent' | 'verticalAlign' | 'fontFamily' | 'fontSize' | 'fontWeight' | 'textTransform' | 'fontStyle' | 'fontVariantNumeric' | 'lineHeight' | 'letterSpacing' | 'textColor' | 'textOpacity' | 'textDecoration' | 'textDecorationColor' | 'textDecorationStyle' | 'textDecorationThickness' | 'textUnderlineOffset' | 'fontSmoothing' | 'placeholderColor' | 'placeholderOpacity' | 'caretColor' | 'accentColor' | 'opacity' | 'backgroundBlendMode' | 'mixBlendMode' | 'boxShadow' | 'boxShadowColor' | 'outlineStyle' | 'outlineWidth' | 'outlineOffset' | 'outlineColor' | 'ringWidth' | 'ringColor' | 'ringOpacity' | 'ringOffsetWidth' | 'ringOffsetColor' | 'blur' | 'brightness' | 'contrast' | 'dropShadow' | 'grayscale' | 'hueRotate' | 'invert' | 'saturate' | 'sepia' | 'filter' | 'backdropBlur' | 'backdropBrightness' | 'backdropContrast' | 'backdropGrayscale' | 'backdropHueRotate' | 'backdropInvert' | 'backdropOpacity' | 'backdropSaturate' | 'backdropSepia' | 'backdropFilter' | 'transitionProperty' | 'transitionDelay' | 'transitionDuration' | 'transitionTimingFunction' | 'willChange' | 'content'
1
+ export type CorePluginList = 'preflight' | 'container' | 'accessibility' | 'pointerEvents' | 'visibility' | 'position' | 'inset' | 'isolation' | 'zIndex' | 'order' | 'gridColumn' | 'gridColumnStart' | 'gridColumnEnd' | 'gridRow' | 'gridRowStart' | 'gridRowEnd' | 'float' | 'clear' | 'margin' | 'boxSizing' | 'lineClamp' | 'display' | 'aspectRatio' | 'height' | 'maxHeight' | 'minHeight' | 'width' | 'minWidth' | 'maxWidth' | 'flex' | 'flexShrink' | 'flexGrow' | 'flexBasis' | 'tableLayout' | 'captionSide' | 'borderCollapse' | 'borderSpacing' | 'transformOrigin' | 'translate' | 'rotate' | 'skew' | 'scale' | 'transform' | 'animation' | 'cursor' | 'touchAction' | 'userSelect' | 'resize' | 'scrollSnapType' | 'scrollSnapAlign' | 'scrollSnapStop' | 'scrollMargin' | 'scrollPadding' | 'listStylePosition' | 'listStyleType' | 'listStyleImage' | 'appearance' | 'columns' | 'breakBefore' | 'breakInside' | 'breakAfter' | 'gridAutoColumns' | 'gridAutoFlow' | 'gridAutoRows' | 'gridTemplateColumns' | 'gridTemplateRows' | 'flexDirection' | 'flexWrap' | 'placeContent' | 'placeItems' | 'alignContent' | 'alignItems' | 'justifyContent' | 'justifyItems' | 'gap' | 'space' | 'divideWidth' | 'divideStyle' | 'divideColor' | 'divideOpacity' | 'placeSelf' | 'alignSelf' | 'justifySelf' | 'overflow' | 'overscrollBehavior' | 'scrollBehavior' | 'textOverflow' | 'hyphens' | 'whitespace' | 'wordBreak' | 'borderRadius' | 'borderWidth' | 'borderStyle' | 'borderColor' | 'borderOpacity' | 'backgroundColor' | 'backgroundOpacity' | 'backgroundImage' | 'gradientColorStops' | 'boxDecorationBreak' | 'backgroundSize' | 'backgroundAttachment' | 'backgroundClip' | 'backgroundPosition' | 'backgroundRepeat' | 'backgroundOrigin' | 'fill' | 'stroke' | 'strokeWidth' | 'objectFit' | 'objectPosition' | 'padding' | 'textAlign' | 'textIndent' | 'verticalAlign' | 'fontFamily' | 'fontSize' | 'fontWeight' | 'textTransform' | 'fontStyle' | 'fontVariantNumeric' | 'lineHeight' | 'letterSpacing' | 'textColor' | 'textOpacity' | 'textDecoration' | 'textDecorationColor' | 'textDecorationStyle' | 'textDecorationThickness' | 'textUnderlineOffset' | 'fontSmoothing' | 'placeholderColor' | 'placeholderOpacity' | 'caretColor' | 'accentColor' | 'opacity' | 'backgroundBlendMode' | 'mixBlendMode' | 'boxShadow' | 'boxShadowColor' | 'outlineStyle' | 'outlineWidth' | 'outlineOffset' | 'outlineColor' | 'ringWidth' | 'ringColor' | 'ringOpacity' | 'ringOffsetWidth' | 'ringOffsetColor' | 'blur' | 'brightness' | 'contrast' | 'dropShadow' | 'grayscale' | 'hueRotate' | 'invert' | 'saturate' | 'sepia' | 'filter' | 'backdropBlur' | 'backdropBrightness' | 'backdropContrast' | 'backdropGrayscale' | 'backdropHueRotate' | 'backdropInvert' | 'backdropOpacity' | 'backdropSaturate' | 'backdropSepia' | 'backdropFilter' | 'transitionProperty' | 'transitionDelay' | 'transitionDuration' | 'transitionTimingFunction' | 'willChange' | 'content'
@@ -153,6 +153,30 @@ export type DefaultTheme = Config['theme'] & {
153
153
  | 'black',
154
154
  string
155
155
  >
156
+ gradientColorStopPositions: Record<
157
+ | '0%'
158
+ | '5%'
159
+ | '10%'
160
+ | '15%'
161
+ | '20%'
162
+ | '25%'
163
+ | '30%'
164
+ | '35%'
165
+ | '40%'
166
+ | '45%'
167
+ | '50%'
168
+ | '55%'
169
+ | '60%'
170
+ | '65%'
171
+ | '70%'
172
+ | '75%'
173
+ | '80%'
174
+ | '85%'
175
+ | '90%'
176
+ | '95%'
177
+ | '100%',
178
+ string
179
+ >
156
180
  grayscale: Record<'0' | 'DEFAULT', string>
157
181
  gridAutoColumns: Record<'auto' | 'min' | 'max' | 'fr', string>
158
182
  gridAutoRows: Record<'auto' | 'min' | 'max' | 'fr', string>
@@ -214,6 +238,8 @@ export type DefaultTheme = Config['theme'] & {
214
238
  string
215
239
  >
216
240
  listStyleType: Record<'none' | 'disc' | 'decimal', string>
241
+ listStyleImage: Record<'none', string>
242
+ lineClamp: Record<'1' | '2' | '3' | '4' | '5' | '6', string>
217
243
  minHeight: Record<'0' | 'full' | 'screen' | 'min' | 'max' | 'fit', string>
218
244
  minWidth: Record<'0' | 'full' | 'min' | 'max' | 'fit', string>
219
245
  objectPosition: Record<
@@ -327,9 +353,12 @@ export type DefaultTheme = Config['theme'] & {
327
353
  | 'top-left',
328
354
  string
329
355
  >
330
- transitionDelay: Record<'75' | '100' | '150' | '200' | '300' | '500' | '700' | '1000', string>
356
+ transitionDelay: Record<
357
+ '0' | '75' | '100' | '150' | '200' | '300' | '500' | '700' | '1000',
358
+ string
359
+ >
331
360
  transitionDuration: Record<
332
- '75' | '100' | '150' | '200' | '300' | '500' | '700' | '1000' | 'DEFAULT',
361
+ '0' | '75' | '100' | '150' | '200' | '300' | '500' | '700' | '1000' | 'DEFAULT',
333
362
  string
334
363
  >
335
364
  transitionProperty: Record<
package/lib/constants.js DELETED
@@ -1,44 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- function _export(target, all) {
6
- for(var name in all)Object.defineProperty(target, name, {
7
- enumerable: true,
8
- get: all[name]
9
- });
10
- }
11
- _export(exports, {
12
- cli: ()=>cli,
13
- defaultConfigFile: ()=>defaultConfigFile,
14
- defaultPostCssConfigFile: ()=>defaultPostCssConfigFile,
15
- cjsConfigFile: ()=>cjsConfigFile,
16
- cjsPostCssConfigFile: ()=>cjsPostCssConfigFile,
17
- supportedConfigFiles: ()=>supportedConfigFiles,
18
- supportedPostCssConfigFile: ()=>supportedPostCssConfigFile,
19
- defaultConfigStubFile: ()=>defaultConfigStubFile,
20
- simpleConfigStubFile: ()=>simpleConfigStubFile,
21
- defaultPostCssConfigStubFile: ()=>defaultPostCssConfigStubFile
22
- });
23
- const _path = /*#__PURE__*/ _interopRequireDefault(require("path"));
24
- function _interopRequireDefault(obj) {
25
- return obj && obj.__esModule ? obj : {
26
- default: obj
27
- };
28
- }
29
- const cli = "tailwind";
30
- const defaultConfigFile = "./tailwind.config.js";
31
- const defaultPostCssConfigFile = "./postcss.config.js";
32
- const cjsConfigFile = "./tailwind.config.cjs";
33
- const cjsPostCssConfigFile = "./postcss.config.cjs";
34
- const supportedConfigFiles = [
35
- cjsConfigFile,
36
- defaultConfigFile
37
- ];
38
- const supportedPostCssConfigFile = [
39
- cjsPostCssConfigFile,
40
- defaultPostCssConfigFile
41
- ];
42
- const defaultConfigStubFile = _path.default.resolve(__dirname, "../stubs/defaultConfig.stub.js");
43
- const simpleConfigStubFile = _path.default.resolve(__dirname, "../stubs/simpleConfig.stub.js");
44
- const defaultPostCssConfigStubFile = _path.default.resolve(__dirname, "../stubs/defaultPostCssConfig.stub.js");
package/src/constants.js DELETED
@@ -1,17 +0,0 @@
1
- import path from 'path'
2
-
3
- export const cli = 'tailwind'
4
- export const defaultConfigFile = './tailwind.config.js'
5
- export const defaultPostCssConfigFile = './postcss.config.js'
6
- export const cjsConfigFile = './tailwind.config.cjs'
7
- export const cjsPostCssConfigFile = './postcss.config.cjs'
8
-
9
- export const supportedConfigFiles = [cjsConfigFile, defaultConfigFile]
10
- export const supportedPostCssConfigFile = [cjsPostCssConfigFile, defaultPostCssConfigFile]
11
-
12
- export const defaultConfigStubFile = path.resolve(__dirname, '../stubs/defaultConfig.stub.js')
13
- export const simpleConfigStubFile = path.resolve(__dirname, '../stubs/simpleConfig.stub.js')
14
- export const defaultPostCssConfigStubFile = path.resolve(
15
- __dirname,
16
- '../stubs/defaultPostCssConfig.stub.js'
17
- )