tailwindcss 0.0.0-insiders.e2d5f21 → 0.0.0-insiders.e302ef1
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 +244 -3
- package/LICENSE +1 -2
- package/README.md +8 -4
- package/colors.js +2 -1
- package/defaultConfig.js +2 -1
- package/defaultTheme.js +2 -1
- package/lib/cli.js +123 -88
- package/lib/corePlugins.js +288 -360
- package/lib/css/preflight.css +4 -4
- package/lib/featureFlags.js +4 -5
- package/lib/index.js +12 -3
- package/lib/lib/cacheInvalidation.js +69 -0
- package/lib/lib/collapseAdjacentRules.js +14 -1
- package/lib/lib/collapseDuplicateDeclarations.js +52 -1
- package/lib/lib/defaultExtractor.js +44 -0
- package/lib/lib/evaluateTailwindFunctions.js +1 -1
- package/lib/lib/expandApplyAtRules.js +265 -60
- package/lib/lib/expandTailwindAtRules.js +63 -48
- package/lib/lib/generateRules.js +136 -34
- package/lib/lib/normalizeTailwindDirectives.js +10 -2
- package/lib/lib/partitionApplyAtRules.js +53 -0
- package/lib/lib/resolveDefaultsAtRules.js +30 -12
- package/lib/lib/setupContextUtils.js +137 -81
- package/lib/lib/setupTrackingContext.js +8 -7
- package/lib/lib/sharedState.js +38 -5
- package/{nesting → lib/postcss-plugins/nesting}/README.md +0 -0
- package/lib/postcss-plugins/nesting/index.js +17 -0
- package/lib/postcss-plugins/nesting/plugin.js +85 -0
- package/lib/processTailwindFeatures.js +10 -2
- package/lib/util/cloneNodes.js +12 -1
- package/lib/util/color.js +23 -8
- package/lib/util/createPlugin.js +1 -2
- package/lib/util/createUtilityPlugin.js +4 -8
- package/lib/util/dataTypes.js +4 -2
- package/lib/util/defaults.js +6 -0
- package/lib/util/flattenColorPalette.js +1 -3
- package/lib/util/log.js +10 -6
- package/lib/util/normalizeConfig.js +47 -15
- package/lib/util/normalizeScreens.js +6 -5
- package/lib/util/parseBoxShadowValue.js +44 -4
- package/lib/util/pluginUtils.js +6 -13
- package/lib/util/prefixSelector.js +4 -5
- package/lib/util/resolveConfig.js +48 -27
- package/lib/util/resolveConfigPath.js +1 -2
- package/lib/util/toColorValue.js +1 -2
- package/lib/util/toPath.js +6 -1
- package/lib/util/transformThemeValue.js +4 -8
- package/nesting/index.js +2 -12
- package/package.json +28 -33
- package/peers/index.js +3209 -4239
- package/plugin.js +2 -1
- package/resolveConfig.js +2 -1
- package/src/cli.js +62 -15
- package/src/corePlugins.js +212 -217
- package/src/css/preflight.css +4 -4
- package/src/featureFlags.js +3 -3
- package/src/index.js +14 -6
- package/src/lib/cacheInvalidation.js +52 -0
- package/src/lib/collapseAdjacentRules.js +16 -1
- package/src/lib/collapseDuplicateDeclarations.js +66 -1
- package/src/lib/defaultExtractor.js +50 -0
- package/src/lib/evaluateTailwindFunctions.js +1 -1
- package/src/lib/expandApplyAtRules.js +285 -56
- package/src/lib/expandTailwindAtRules.js +75 -37
- package/src/lib/generateRules.js +121 -27
- package/src/lib/normalizeTailwindDirectives.js +7 -1
- package/src/lib/partitionApplyAtRules.js +52 -0
- package/src/lib/resolveDefaultsAtRules.js +35 -10
- package/src/lib/setupContextUtils.js +127 -45
- package/src/lib/setupTrackingContext.js +8 -7
- package/src/lib/sharedState.js +42 -4
- 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 +12 -2
- package/src/util/cloneNodes.js +14 -1
- package/src/util/color.js +20 -7
- package/src/util/dataTypes.js +7 -5
- package/src/util/defaults.js +6 -0
- package/src/util/log.js +10 -6
- package/src/util/normalizeConfig.js +24 -3
- package/src/util/normalizeScreens.js +6 -3
- package/src/util/parseBoxShadowValue.js +51 -3
- package/src/util/pluginUtils.js +1 -1
- package/src/util/prefixSelector.js +7 -5
- package/src/util/resolveConfig.js +41 -1
- package/src/util/toPath.js +23 -1
- package/stubs/defaultConfig.stub.js +2 -2
- package/lib/lib/setupWatchingContext.js +0 -288
- package/nesting/plugin.js +0 -41
- package/src/lib/setupWatchingContext.js +0 -311
package/src/corePlugins.js
CHANGED
|
@@ -70,7 +70,28 @@ export let variantPlugins = {
|
|
|
70
70
|
'only-of-type',
|
|
71
71
|
|
|
72
72
|
// State
|
|
73
|
-
|
|
73
|
+
[
|
|
74
|
+
'visited',
|
|
75
|
+
({ container }) => {
|
|
76
|
+
let toRemove = ['--tw-text-opacity', '--tw-border-opacity', '--tw-bg-opacity']
|
|
77
|
+
|
|
78
|
+
container.walkDecls((decl) => {
|
|
79
|
+
if (toRemove.includes(decl.prop)) {
|
|
80
|
+
decl.remove()
|
|
81
|
+
|
|
82
|
+
return
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
for (const varName of toRemove) {
|
|
86
|
+
if (decl.value.includes(`/ var(${varName})`)) {
|
|
87
|
+
decl.value = decl.value.replace(`/ var(${varName})`, '')
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
})
|
|
91
|
+
|
|
92
|
+
return ':visited'
|
|
93
|
+
},
|
|
94
|
+
],
|
|
74
95
|
'target',
|
|
75
96
|
['open', '[open]'],
|
|
76
97
|
|
|
@@ -100,15 +121,27 @@ export let variantPlugins = {
|
|
|
100
121
|
].map((variant) => (Array.isArray(variant) ? variant : [variant, `:${variant}`]))
|
|
101
122
|
|
|
102
123
|
for (let [variantName, state] of pseudoVariants) {
|
|
103
|
-
addVariant(variantName,
|
|
124
|
+
addVariant(variantName, (ctx) => {
|
|
125
|
+
let result = typeof state === 'function' ? state(ctx) : state
|
|
126
|
+
|
|
127
|
+
return `&${result}`
|
|
128
|
+
})
|
|
104
129
|
}
|
|
105
130
|
|
|
106
131
|
for (let [variantName, state] of pseudoVariants) {
|
|
107
|
-
addVariant(`group-${variantName}`,
|
|
132
|
+
addVariant(`group-${variantName}`, (ctx) => {
|
|
133
|
+
let result = typeof state === 'function' ? state(ctx) : state
|
|
134
|
+
|
|
135
|
+
return `:merge(.group)${result} &`
|
|
136
|
+
})
|
|
108
137
|
}
|
|
109
138
|
|
|
110
139
|
for (let [variantName, state] of pseudoVariants) {
|
|
111
|
-
addVariant(`peer-${variantName}`,
|
|
140
|
+
addVariant(`peer-${variantName}`, (ctx) => {
|
|
141
|
+
let result = typeof state === 'function' ? state(ctx) : state
|
|
142
|
+
|
|
143
|
+
return `:merge(.peer)${result} ~ &`
|
|
144
|
+
})
|
|
112
145
|
}
|
|
113
146
|
},
|
|
114
147
|
|
|
@@ -138,17 +171,19 @@ export let variantPlugins = {
|
|
|
138
171
|
},
|
|
139
172
|
|
|
140
173
|
darkVariants: ({ config, addVariant }) => {
|
|
141
|
-
let mode = config('darkMode', 'media')
|
|
174
|
+
let [mode, className = '.dark'] = [].concat(config('darkMode', 'media'))
|
|
175
|
+
|
|
142
176
|
if (mode === false) {
|
|
143
177
|
mode = 'media'
|
|
144
178
|
log.warn('darkmode-false', [
|
|
145
179
|
'The `darkMode` option in your Tailwind CSS configuration is set to `false`, which now behaves the same as `media`.',
|
|
146
180
|
'Change `darkMode` to `media` or remove it entirely.',
|
|
181
|
+
'https://tailwindcss.com/docs/upgrade-guide#remove-dark-mode-configuration',
|
|
147
182
|
])
|
|
148
183
|
}
|
|
149
184
|
|
|
150
185
|
if (mode === 'class') {
|
|
151
|
-
addVariant('dark',
|
|
186
|
+
addVariant('dark', `${className} &`)
|
|
152
187
|
} else if (mode === 'media') {
|
|
153
188
|
addVariant('dark', '@media (prefers-color-scheme: dark)')
|
|
154
189
|
}
|
|
@@ -172,6 +207,39 @@ export let variantPlugins = {
|
|
|
172
207
|
},
|
|
173
208
|
}
|
|
174
209
|
|
|
210
|
+
let cssTransformValue = [
|
|
211
|
+
'translate(var(--tw-translate-x), var(--tw-translate-y))',
|
|
212
|
+
'rotate(var(--tw-rotate))',
|
|
213
|
+
'skewX(var(--tw-skew-x))',
|
|
214
|
+
'skewY(var(--tw-skew-y))',
|
|
215
|
+
'scaleX(var(--tw-scale-x))',
|
|
216
|
+
'scaleY(var(--tw-scale-y))',
|
|
217
|
+
].join(' ')
|
|
218
|
+
|
|
219
|
+
let cssFilterValue = [
|
|
220
|
+
'var(--tw-blur)',
|
|
221
|
+
'var(--tw-brightness)',
|
|
222
|
+
'var(--tw-contrast)',
|
|
223
|
+
'var(--tw-grayscale)',
|
|
224
|
+
'var(--tw-hue-rotate)',
|
|
225
|
+
'var(--tw-invert)',
|
|
226
|
+
'var(--tw-saturate)',
|
|
227
|
+
'var(--tw-sepia)',
|
|
228
|
+
'var(--tw-drop-shadow)',
|
|
229
|
+
].join(' ')
|
|
230
|
+
|
|
231
|
+
let cssBackdropFilterValue = [
|
|
232
|
+
'var(--tw-backdrop-blur)',
|
|
233
|
+
'var(--tw-backdrop-brightness)',
|
|
234
|
+
'var(--tw-backdrop-contrast)',
|
|
235
|
+
'var(--tw-backdrop-grayscale)',
|
|
236
|
+
'var(--tw-backdrop-hue-rotate)',
|
|
237
|
+
'var(--tw-backdrop-invert)',
|
|
238
|
+
'var(--tw-backdrop-opacity)',
|
|
239
|
+
'var(--tw-backdrop-saturate)',
|
|
240
|
+
'var(--tw-backdrop-sepia)',
|
|
241
|
+
].join(' ')
|
|
242
|
+
|
|
175
243
|
export let corePlugins = {
|
|
176
244
|
preflight: ({ addBase }) => {
|
|
177
245
|
let preflightStyles = postcss.parse(
|
|
@@ -467,11 +535,11 @@ export let corePlugins = {
|
|
|
467
535
|
[
|
|
468
536
|
[
|
|
469
537
|
'translate-x',
|
|
470
|
-
[['@defaults transform', {}], '--tw-translate-x', ['transform',
|
|
538
|
+
[['@defaults transform', {}], '--tw-translate-x', ['transform', cssTransformValue]],
|
|
471
539
|
],
|
|
472
540
|
[
|
|
473
541
|
'translate-y',
|
|
474
|
-
[['@defaults transform', {}], '--tw-translate-y', ['transform',
|
|
542
|
+
[['@defaults transform', {}], '--tw-translate-y', ['transform', cssTransformValue]],
|
|
475
543
|
],
|
|
476
544
|
],
|
|
477
545
|
],
|
|
@@ -479,26 +547,15 @@ export let corePlugins = {
|
|
|
479
547
|
),
|
|
480
548
|
rotate: createUtilityPlugin(
|
|
481
549
|
'rotate',
|
|
482
|
-
[
|
|
483
|
-
[
|
|
484
|
-
'rotate',
|
|
485
|
-
[['@defaults transform', {}], '--tw-rotate', ['transform', 'var(--tw-transform)']],
|
|
486
|
-
],
|
|
487
|
-
],
|
|
550
|
+
[['rotate', [['@defaults transform', {}], '--tw-rotate', ['transform', cssTransformValue]]]],
|
|
488
551
|
{ supportsNegativeValues: true }
|
|
489
552
|
),
|
|
490
553
|
skew: createUtilityPlugin(
|
|
491
554
|
'skew',
|
|
492
555
|
[
|
|
493
556
|
[
|
|
494
|
-
[
|
|
495
|
-
|
|
496
|
-
[['@defaults transform', {}], '--tw-skew-x', ['transform', 'var(--tw-transform)']],
|
|
497
|
-
],
|
|
498
|
-
[
|
|
499
|
-
'skew-y',
|
|
500
|
-
[['@defaults transform', {}], '--tw-skew-y', ['transform', 'var(--tw-transform)']],
|
|
501
|
-
],
|
|
557
|
+
['skew-x', [['@defaults transform', {}], '--tw-skew-x', ['transform', cssTransformValue]]],
|
|
558
|
+
['skew-y', [['@defaults transform', {}], '--tw-skew-y', ['transform', cssTransformValue]]],
|
|
502
559
|
],
|
|
503
560
|
],
|
|
504
561
|
{ supportsNegativeValues: true }
|
|
@@ -512,66 +569,44 @@ export let corePlugins = {
|
|
|
512
569
|
['@defaults transform', {}],
|
|
513
570
|
'--tw-scale-x',
|
|
514
571
|
'--tw-scale-y',
|
|
515
|
-
['transform',
|
|
572
|
+
['transform', cssTransformValue],
|
|
516
573
|
],
|
|
517
574
|
],
|
|
518
575
|
[
|
|
519
576
|
[
|
|
520
577
|
'scale-x',
|
|
521
|
-
[['@defaults transform', {}], '--tw-scale-x', ['transform',
|
|
578
|
+
[['@defaults transform', {}], '--tw-scale-x', ['transform', cssTransformValue]],
|
|
522
579
|
],
|
|
523
580
|
[
|
|
524
581
|
'scale-y',
|
|
525
|
-
[['@defaults transform', {}], '--tw-scale-y', ['transform',
|
|
582
|
+
[['@defaults transform', {}], '--tw-scale-y', ['transform', cssTransformValue]],
|
|
526
583
|
],
|
|
527
584
|
],
|
|
528
585
|
],
|
|
529
586
|
{ supportsNegativeValues: true }
|
|
530
587
|
),
|
|
531
588
|
|
|
532
|
-
transform: ({
|
|
533
|
-
|
|
534
|
-
'
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
'rotate(var(--tw-rotate))',
|
|
546
|
-
'skewX(var(--tw-skew-x))',
|
|
547
|
-
'skewY(var(--tw-skew-y))',
|
|
548
|
-
'scaleX(var(--tw-scale-x))',
|
|
549
|
-
'scaleY(var(--tw-scale-y))',
|
|
550
|
-
].join(' '),
|
|
551
|
-
},
|
|
552
|
-
})
|
|
553
|
-
addUtilities({
|
|
554
|
-
'.transform': { '@defaults transform': {}, transform: 'var(--tw-transform)' },
|
|
589
|
+
transform: ({ addDefaults, addUtilities }) => {
|
|
590
|
+
addDefaults('transform', {
|
|
591
|
+
'--tw-translate-x': '0',
|
|
592
|
+
'--tw-translate-y': '0',
|
|
593
|
+
'--tw-rotate': '0',
|
|
594
|
+
'--tw-skew-x': '0',
|
|
595
|
+
'--tw-skew-y': '0',
|
|
596
|
+
'--tw-scale-x': '1',
|
|
597
|
+
'--tw-scale-y': '1',
|
|
598
|
+
})
|
|
599
|
+
|
|
600
|
+
addUtilities({
|
|
601
|
+
'.transform': { '@defaults transform': {}, transform: cssTransformValue },
|
|
555
602
|
'.transform-cpu': {
|
|
556
|
-
|
|
557
|
-
'translateX(var(--tw-translate-x))',
|
|
558
|
-
'translateY(var(--tw-translate-y))',
|
|
559
|
-
'rotate(var(--tw-rotate))',
|
|
560
|
-
'skewX(var(--tw-skew-x))',
|
|
561
|
-
'skewY(var(--tw-skew-y))',
|
|
562
|
-
'scaleX(var(--tw-scale-x))',
|
|
563
|
-
'scaleY(var(--tw-scale-y))',
|
|
564
|
-
].join(' '),
|
|
603
|
+
transform: cssTransformValue,
|
|
565
604
|
},
|
|
566
605
|
'.transform-gpu': {
|
|
567
|
-
|
|
568
|
-
'
|
|
569
|
-
'
|
|
570
|
-
|
|
571
|
-
'skewY(var(--tw-skew-y))',
|
|
572
|
-
'scaleX(var(--tw-scale-x))',
|
|
573
|
-
'scaleY(var(--tw-scale-y))',
|
|
574
|
-
].join(' '),
|
|
606
|
+
transform: cssTransformValue.replace(
|
|
607
|
+
'translate(var(--tw-translate-x), var(--tw-translate-y))',
|
|
608
|
+
'translate3d(var(--tw-translate-x), var(--tw-translate-y), 0)'
|
|
609
|
+
),
|
|
575
610
|
},
|
|
576
611
|
'.transform-none': { transform: 'none' },
|
|
577
612
|
})
|
|
@@ -611,53 +646,52 @@ export let corePlugins = {
|
|
|
611
646
|
|
|
612
647
|
cursor: createUtilityPlugin('cursor'),
|
|
613
648
|
|
|
614
|
-
touchAction: ({
|
|
615
|
-
|
|
616
|
-
'
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
'--tw-pinch-zoom': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
620
|
-
'--tw-touch-action': 'var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)',
|
|
621
|
-
},
|
|
649
|
+
touchAction: ({ addDefaults, addUtilities }) => {
|
|
650
|
+
addDefaults('touch-action', {
|
|
651
|
+
'--tw-pan-x': ' ',
|
|
652
|
+
'--tw-pan-y': ' ',
|
|
653
|
+
'--tw-pinch-zoom': ' ',
|
|
622
654
|
})
|
|
623
655
|
|
|
656
|
+
let cssTouchActionValue = 'var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)'
|
|
657
|
+
|
|
624
658
|
addUtilities({
|
|
625
659
|
'.touch-auto': { 'touch-action': 'auto' },
|
|
626
660
|
'.touch-none': { 'touch-action': 'none' },
|
|
627
661
|
'.touch-pan-x': {
|
|
628
662
|
'@defaults touch-action': {},
|
|
629
663
|
'--tw-pan-x': 'pan-x',
|
|
630
|
-
'touch-action':
|
|
664
|
+
'touch-action': cssTouchActionValue,
|
|
631
665
|
},
|
|
632
666
|
'.touch-pan-left': {
|
|
633
667
|
'@defaults touch-action': {},
|
|
634
668
|
'--tw-pan-x': 'pan-left',
|
|
635
|
-
'touch-action':
|
|
669
|
+
'touch-action': cssTouchActionValue,
|
|
636
670
|
},
|
|
637
671
|
'.touch-pan-right': {
|
|
638
672
|
'@defaults touch-action': {},
|
|
639
673
|
'--tw-pan-x': 'pan-right',
|
|
640
|
-
'touch-action':
|
|
674
|
+
'touch-action': cssTouchActionValue,
|
|
641
675
|
},
|
|
642
676
|
'.touch-pan-y': {
|
|
643
677
|
'@defaults touch-action': {},
|
|
644
678
|
'--tw-pan-y': 'pan-y',
|
|
645
|
-
'touch-action':
|
|
679
|
+
'touch-action': cssTouchActionValue,
|
|
646
680
|
},
|
|
647
681
|
'.touch-pan-up': {
|
|
648
682
|
'@defaults touch-action': {},
|
|
649
683
|
'--tw-pan-y': 'pan-up',
|
|
650
|
-
'touch-action':
|
|
684
|
+
'touch-action': cssTouchActionValue,
|
|
651
685
|
},
|
|
652
686
|
'.touch-pan-down': {
|
|
653
687
|
'@defaults touch-action': {},
|
|
654
688
|
'--tw-pan-y': 'pan-down',
|
|
655
|
-
'touch-action':
|
|
689
|
+
'touch-action': cssTouchActionValue,
|
|
656
690
|
},
|
|
657
691
|
'.touch-pinch-zoom': {
|
|
658
692
|
'@defaults touch-action': {},
|
|
659
693
|
'--tw-pinch-zoom': 'pinch-zoom',
|
|
660
|
-
'touch-action':
|
|
694
|
+
'touch-action': cssTouchActionValue,
|
|
661
695
|
},
|
|
662
696
|
'.touch-manipulation': { 'touch-action': 'manipulation' },
|
|
663
697
|
})
|
|
@@ -681,11 +715,9 @@ export let corePlugins = {
|
|
|
681
715
|
})
|
|
682
716
|
},
|
|
683
717
|
|
|
684
|
-
scrollSnapType: ({
|
|
685
|
-
|
|
686
|
-
'
|
|
687
|
-
'--tw-scroll-snap-strictness': 'proximity',
|
|
688
|
-
},
|
|
718
|
+
scrollSnapType: ({ addDefaults, addUtilities }) => {
|
|
719
|
+
addDefaults('scroll-snap-type', {
|
|
720
|
+
'--tw-scroll-snap-strictness': 'proximity',
|
|
689
721
|
})
|
|
690
722
|
|
|
691
723
|
addUtilities({
|
|
@@ -1182,24 +1214,7 @@ export let corePlugins = {
|
|
|
1182
1214
|
})
|
|
1183
1215
|
},
|
|
1184
1216
|
|
|
1185
|
-
borderColor: ({
|
|
1186
|
-
if (!corePlugins('borderOpacity')) {
|
|
1187
|
-
let value = theme('borderColor.DEFAULT', 'currentColor')
|
|
1188
|
-
addBase({
|
|
1189
|
-
'@defaults border-width': {
|
|
1190
|
-
'border-color': toColorValue(value),
|
|
1191
|
-
},
|
|
1192
|
-
})
|
|
1193
|
-
} else {
|
|
1194
|
-
addBase({
|
|
1195
|
-
'@defaults border-width': withAlphaVariable({
|
|
1196
|
-
color: theme('borderColor.DEFAULT', 'currentColor'),
|
|
1197
|
-
property: 'border-color',
|
|
1198
|
-
variable: '--tw-border-opacity',
|
|
1199
|
-
}),
|
|
1200
|
-
})
|
|
1201
|
-
}
|
|
1202
|
-
|
|
1217
|
+
borderColor: ({ matchUtilities, theme, corePlugins }) => {
|
|
1203
1218
|
matchUtilities(
|
|
1204
1219
|
{
|
|
1205
1220
|
border: (value) => {
|
|
@@ -1508,6 +1523,8 @@ export let corePlugins = {
|
|
|
1508
1523
|
'.text-center': { 'text-align': 'center' },
|
|
1509
1524
|
'.text-right': { 'text-align': 'right' },
|
|
1510
1525
|
'.text-justify': { 'text-align': 'justify' },
|
|
1526
|
+
'.text-start': { 'text-align': 'start' },
|
|
1527
|
+
'.text-end': { 'text-align': 'end' },
|
|
1511
1528
|
})
|
|
1512
1529
|
},
|
|
1513
1530
|
|
|
@@ -1577,57 +1594,59 @@ export let corePlugins = {
|
|
|
1577
1594
|
})
|
|
1578
1595
|
},
|
|
1579
1596
|
|
|
1580
|
-
fontVariantNumeric: ({ addUtilities }) => {
|
|
1597
|
+
fontVariantNumeric: ({ addDefaults, addUtilities }) => {
|
|
1598
|
+
let cssFontVariantNumericValue =
|
|
1599
|
+
'var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)'
|
|
1600
|
+
|
|
1601
|
+
addDefaults('font-variant-numeric', {
|
|
1602
|
+
'--tw-ordinal': ' ',
|
|
1603
|
+
'--tw-slashed-zero': ' ',
|
|
1604
|
+
'--tw-numeric-figure': ' ',
|
|
1605
|
+
'--tw-numeric-spacing': ' ',
|
|
1606
|
+
'--tw-numeric-fraction': ' ',
|
|
1607
|
+
})
|
|
1608
|
+
|
|
1581
1609
|
addUtilities({
|
|
1582
|
-
'@defaults font-variant-numeric': {
|
|
1583
|
-
'--tw-ordinal': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
1584
|
-
'--tw-slashed-zero': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
1585
|
-
'--tw-numeric-figure': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
1586
|
-
'--tw-numeric-spacing': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
1587
|
-
'--tw-numeric-fraction': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
1588
|
-
'--tw-font-variant-numeric':
|
|
1589
|
-
'var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)',
|
|
1590
|
-
},
|
|
1591
1610
|
'.normal-nums': { 'font-variant-numeric': 'normal' },
|
|
1592
1611
|
'.ordinal': {
|
|
1593
1612
|
'@defaults font-variant-numeric': {},
|
|
1594
1613
|
'--tw-ordinal': 'ordinal',
|
|
1595
|
-
'font-variant-numeric':
|
|
1614
|
+
'font-variant-numeric': cssFontVariantNumericValue,
|
|
1596
1615
|
},
|
|
1597
1616
|
'.slashed-zero': {
|
|
1598
1617
|
'@defaults font-variant-numeric': {},
|
|
1599
1618
|
'--tw-slashed-zero': 'slashed-zero',
|
|
1600
|
-
'font-variant-numeric':
|
|
1619
|
+
'font-variant-numeric': cssFontVariantNumericValue,
|
|
1601
1620
|
},
|
|
1602
1621
|
'.lining-nums': {
|
|
1603
1622
|
'@defaults font-variant-numeric': {},
|
|
1604
1623
|
'--tw-numeric-figure': 'lining-nums',
|
|
1605
|
-
'font-variant-numeric':
|
|
1624
|
+
'font-variant-numeric': cssFontVariantNumericValue,
|
|
1606
1625
|
},
|
|
1607
1626
|
'.oldstyle-nums': {
|
|
1608
1627
|
'@defaults font-variant-numeric': {},
|
|
1609
1628
|
'--tw-numeric-figure': 'oldstyle-nums',
|
|
1610
|
-
'font-variant-numeric':
|
|
1629
|
+
'font-variant-numeric': cssFontVariantNumericValue,
|
|
1611
1630
|
},
|
|
1612
1631
|
'.proportional-nums': {
|
|
1613
1632
|
'@defaults font-variant-numeric': {},
|
|
1614
1633
|
'--tw-numeric-spacing': 'proportional-nums',
|
|
1615
|
-
'font-variant-numeric':
|
|
1634
|
+
'font-variant-numeric': cssFontVariantNumericValue,
|
|
1616
1635
|
},
|
|
1617
1636
|
'.tabular-nums': {
|
|
1618
1637
|
'@defaults font-variant-numeric': {},
|
|
1619
1638
|
'--tw-numeric-spacing': 'tabular-nums',
|
|
1620
|
-
'font-variant-numeric':
|
|
1639
|
+
'font-variant-numeric': cssFontVariantNumericValue,
|
|
1621
1640
|
},
|
|
1622
1641
|
'.diagonal-fractions': {
|
|
1623
1642
|
'@defaults font-variant-numeric': {},
|
|
1624
1643
|
'--tw-numeric-fraction': 'diagonal-fractions',
|
|
1625
|
-
'font-variant-numeric':
|
|
1644
|
+
'font-variant-numeric': cssFontVariantNumericValue,
|
|
1626
1645
|
},
|
|
1627
1646
|
'.stacked-fractions': {
|
|
1628
1647
|
'@defaults font-variant-numeric': {},
|
|
1629
1648
|
'--tw-numeric-fraction': 'stacked-fractions',
|
|
1630
|
-
'font-variant-numeric':
|
|
1649
|
+
'font-variant-numeric': cssFontVariantNumericValue,
|
|
1631
1650
|
},
|
|
1632
1651
|
})
|
|
1633
1652
|
},
|
|
@@ -1660,10 +1679,10 @@ export let corePlugins = {
|
|
|
1660
1679
|
|
|
1661
1680
|
textDecoration: ({ addUtilities }) => {
|
|
1662
1681
|
addUtilities({
|
|
1663
|
-
'.underline': { 'text-decoration': 'underline' },
|
|
1664
|
-
'.overline': { 'text-decoration': 'overline' },
|
|
1665
|
-
'.line-through': { 'text-decoration': 'line-through' },
|
|
1666
|
-
'.no-underline': { 'text-decoration': 'none' },
|
|
1682
|
+
'.underline': { 'text-decoration-line': 'underline' },
|
|
1683
|
+
'.overline': { 'text-decoration-line': 'overline' },
|
|
1684
|
+
'.line-through': { 'text-decoration-line': 'line-through' },
|
|
1685
|
+
'.no-underline': { 'text-decoration-line': 'none' },
|
|
1667
1686
|
})
|
|
1668
1687
|
},
|
|
1669
1688
|
|
|
@@ -1823,14 +1842,12 @@ export let corePlugins = {
|
|
|
1823
1842
|
`var(--tw-shadow)`,
|
|
1824
1843
|
].join(', ')
|
|
1825
1844
|
|
|
1826
|
-
return function ({ matchUtilities,
|
|
1827
|
-
|
|
1828
|
-
'
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
'--tw-shadow-colored': '0 0 #0000',
|
|
1833
|
-
},
|
|
1845
|
+
return function ({ matchUtilities, addDefaults, theme }) {
|
|
1846
|
+
addDefaults(' box-shadow', {
|
|
1847
|
+
'--tw-ring-offset-shadow': '0 0 #0000',
|
|
1848
|
+
'--tw-ring-shadow': '0 0 #0000',
|
|
1849
|
+
'--tw-shadow': '0 0 #0000',
|
|
1850
|
+
'--tw-shadow-colored': '0 0 #0000',
|
|
1834
1851
|
})
|
|
1835
1852
|
|
|
1836
1853
|
matchUtilities(
|
|
@@ -1908,25 +1925,23 @@ export let corePlugins = {
|
|
|
1908
1925
|
)
|
|
1909
1926
|
},
|
|
1910
1927
|
|
|
1911
|
-
ringWidth: ({ matchUtilities,
|
|
1928
|
+
ringWidth: ({ matchUtilities, addDefaults, addUtilities, theme }) => {
|
|
1912
1929
|
let ringOpacityDefault = theme('ringOpacity.DEFAULT', '0.5')
|
|
1913
1930
|
let ringColorDefault = withAlphaValue(
|
|
1914
|
-
theme('ringColor
|
|
1931
|
+
theme('ringColor')?.DEFAULT,
|
|
1915
1932
|
ringOpacityDefault,
|
|
1916
1933
|
`rgb(147 197 253 / ${ringOpacityDefault})`
|
|
1917
1934
|
)
|
|
1918
1935
|
|
|
1919
|
-
|
|
1920
|
-
'
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
'--tw-shadow-colored': '0 0 #0000',
|
|
1929
|
-
},
|
|
1936
|
+
addDefaults('ring-width', {
|
|
1937
|
+
'--tw-ring-inset': ' ',
|
|
1938
|
+
'--tw-ring-offset-width': theme('ringOffsetWidth.DEFAULT', '0px'),
|
|
1939
|
+
'--tw-ring-offset-color': theme('ringOffsetColor.DEFAULT', '#fff'),
|
|
1940
|
+
'--tw-ring-color': ringColorDefault,
|
|
1941
|
+
'--tw-ring-offset-shadow': '0 0 #0000',
|
|
1942
|
+
'--tw-ring-shadow': '0 0 #0000',
|
|
1943
|
+
'--tw-shadow': '0 0 #0000',
|
|
1944
|
+
'--tw-shadow-colored': '0 0 #0000',
|
|
1930
1945
|
})
|
|
1931
1946
|
|
|
1932
1947
|
matchUtilities(
|
|
@@ -1952,10 +1967,16 @@ export let corePlugins = {
|
|
|
1952
1967
|
})
|
|
1953
1968
|
},
|
|
1954
1969
|
|
|
1955
|
-
ringColor: ({ matchUtilities, theme }) => {
|
|
1970
|
+
ringColor: ({ matchUtilities, theme, corePlugins }) => {
|
|
1956
1971
|
matchUtilities(
|
|
1957
1972
|
{
|
|
1958
1973
|
ring: (value) => {
|
|
1974
|
+
if (!corePlugins('ringOpacity')) {
|
|
1975
|
+
return {
|
|
1976
|
+
'--tw-ring-color': toColorValue(value),
|
|
1977
|
+
}
|
|
1978
|
+
}
|
|
1979
|
+
|
|
1959
1980
|
return withAlphaVariable({
|
|
1960
1981
|
color: value,
|
|
1961
1982
|
property: '--tw-ring-color',
|
|
@@ -2003,7 +2024,7 @@ export let corePlugins = {
|
|
|
2003
2024
|
return {
|
|
2004
2025
|
'--tw-blur': `blur(${value})`,
|
|
2005
2026
|
'@defaults filter': {},
|
|
2006
|
-
filter:
|
|
2027
|
+
filter: cssFilterValue,
|
|
2007
2028
|
}
|
|
2008
2029
|
},
|
|
2009
2030
|
},
|
|
@@ -2018,7 +2039,7 @@ export let corePlugins = {
|
|
|
2018
2039
|
return {
|
|
2019
2040
|
'--tw-brightness': `brightness(${value})`,
|
|
2020
2041
|
'@defaults filter': {},
|
|
2021
|
-
filter:
|
|
2042
|
+
filter: cssFilterValue,
|
|
2022
2043
|
}
|
|
2023
2044
|
},
|
|
2024
2045
|
},
|
|
@@ -2033,7 +2054,7 @@ export let corePlugins = {
|
|
|
2033
2054
|
return {
|
|
2034
2055
|
'--tw-contrast': `contrast(${value})`,
|
|
2035
2056
|
'@defaults filter': {},
|
|
2036
|
-
filter:
|
|
2057
|
+
filter: cssFilterValue,
|
|
2037
2058
|
}
|
|
2038
2059
|
},
|
|
2039
2060
|
},
|
|
@@ -2050,7 +2071,7 @@ export let corePlugins = {
|
|
|
2050
2071
|
? value.map((v) => `drop-shadow(${v})`).join(' ')
|
|
2051
2072
|
: `drop-shadow(${value})`,
|
|
2052
2073
|
'@defaults filter': {},
|
|
2053
|
-
filter:
|
|
2074
|
+
filter: cssFilterValue,
|
|
2054
2075
|
}
|
|
2055
2076
|
},
|
|
2056
2077
|
},
|
|
@@ -2065,7 +2086,7 @@ export let corePlugins = {
|
|
|
2065
2086
|
return {
|
|
2066
2087
|
'--tw-grayscale': `grayscale(${value})`,
|
|
2067
2088
|
'@defaults filter': {},
|
|
2068
|
-
filter:
|
|
2089
|
+
filter: cssFilterValue,
|
|
2069
2090
|
}
|
|
2070
2091
|
},
|
|
2071
2092
|
},
|
|
@@ -2080,7 +2101,7 @@ export let corePlugins = {
|
|
|
2080
2101
|
return {
|
|
2081
2102
|
'--tw-hue-rotate': `hue-rotate(${value})`,
|
|
2082
2103
|
'@defaults filter': {},
|
|
2083
|
-
filter:
|
|
2104
|
+
filter: cssFilterValue,
|
|
2084
2105
|
}
|
|
2085
2106
|
},
|
|
2086
2107
|
},
|
|
@@ -2095,7 +2116,7 @@ export let corePlugins = {
|
|
|
2095
2116
|
return {
|
|
2096
2117
|
'--tw-invert': `invert(${value})`,
|
|
2097
2118
|
'@defaults filter': {},
|
|
2098
|
-
filter:
|
|
2119
|
+
filter: cssFilterValue,
|
|
2099
2120
|
}
|
|
2100
2121
|
},
|
|
2101
2122
|
},
|
|
@@ -2110,7 +2131,7 @@ export let corePlugins = {
|
|
|
2110
2131
|
return {
|
|
2111
2132
|
'--tw-saturate': `saturate(${value})`,
|
|
2112
2133
|
'@defaults filter': {},
|
|
2113
|
-
filter:
|
|
2134
|
+
filter: cssFilterValue,
|
|
2114
2135
|
}
|
|
2115
2136
|
},
|
|
2116
2137
|
},
|
|
@@ -2125,7 +2146,7 @@ export let corePlugins = {
|
|
|
2125
2146
|
return {
|
|
2126
2147
|
'--tw-sepia': `sepia(${value})`,
|
|
2127
2148
|
'@defaults filter': {},
|
|
2128
|
-
filter:
|
|
2149
|
+
filter: cssFilterValue,
|
|
2129
2150
|
}
|
|
2130
2151
|
},
|
|
2131
2152
|
},
|
|
@@ -2133,33 +2154,20 @@ export let corePlugins = {
|
|
|
2133
2154
|
)
|
|
2134
2155
|
},
|
|
2135
2156
|
|
|
2136
|
-
filter: ({
|
|
2137
|
-
|
|
2138
|
-
'
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
'var(--tw-brightness)',
|
|
2151
|
-
'var(--tw-contrast)',
|
|
2152
|
-
'var(--tw-grayscale)',
|
|
2153
|
-
'var(--tw-hue-rotate)',
|
|
2154
|
-
'var(--tw-invert)',
|
|
2155
|
-
'var(--tw-saturate)',
|
|
2156
|
-
'var(--tw-sepia)',
|
|
2157
|
-
'var(--tw-drop-shadow)',
|
|
2158
|
-
].join(' '),
|
|
2159
|
-
},
|
|
2160
|
-
})
|
|
2161
|
-
addUtilities({
|
|
2162
|
-
'.filter': { '@defaults filter': {}, filter: 'var(--tw-filter)' },
|
|
2157
|
+
filter: ({ addDefaults, addUtilities }) => {
|
|
2158
|
+
addDefaults('filter', {
|
|
2159
|
+
'--tw-blur': ' ',
|
|
2160
|
+
'--tw-brightness': ' ',
|
|
2161
|
+
'--tw-contrast': ' ',
|
|
2162
|
+
'--tw-grayscale': ' ',
|
|
2163
|
+
'--tw-hue-rotate': ' ',
|
|
2164
|
+
'--tw-invert': ' ',
|
|
2165
|
+
'--tw-saturate': ' ',
|
|
2166
|
+
'--tw-sepia': ' ',
|
|
2167
|
+
'--tw-drop-shadow': ' ',
|
|
2168
|
+
})
|
|
2169
|
+
addUtilities({
|
|
2170
|
+
'.filter': { '@defaults filter': {}, filter: cssFilterValue },
|
|
2163
2171
|
'.filter-none': { filter: 'none' },
|
|
2164
2172
|
})
|
|
2165
2173
|
},
|
|
@@ -2171,7 +2179,7 @@ export let corePlugins = {
|
|
|
2171
2179
|
return {
|
|
2172
2180
|
'--tw-backdrop-blur': `blur(${value})`,
|
|
2173
2181
|
'@defaults backdrop-filter': {},
|
|
2174
|
-
'backdrop-filter':
|
|
2182
|
+
'backdrop-filter': cssBackdropFilterValue,
|
|
2175
2183
|
}
|
|
2176
2184
|
},
|
|
2177
2185
|
},
|
|
@@ -2186,7 +2194,7 @@ export let corePlugins = {
|
|
|
2186
2194
|
return {
|
|
2187
2195
|
'--tw-backdrop-brightness': `brightness(${value})`,
|
|
2188
2196
|
'@defaults backdrop-filter': {},
|
|
2189
|
-
'backdrop-filter':
|
|
2197
|
+
'backdrop-filter': cssBackdropFilterValue,
|
|
2190
2198
|
}
|
|
2191
2199
|
},
|
|
2192
2200
|
},
|
|
@@ -2201,7 +2209,7 @@ export let corePlugins = {
|
|
|
2201
2209
|
return {
|
|
2202
2210
|
'--tw-backdrop-contrast': `contrast(${value})`,
|
|
2203
2211
|
'@defaults backdrop-filter': {},
|
|
2204
|
-
'backdrop-filter':
|
|
2212
|
+
'backdrop-filter': cssBackdropFilterValue,
|
|
2205
2213
|
}
|
|
2206
2214
|
},
|
|
2207
2215
|
},
|
|
@@ -2216,7 +2224,7 @@ export let corePlugins = {
|
|
|
2216
2224
|
return {
|
|
2217
2225
|
'--tw-backdrop-grayscale': `grayscale(${value})`,
|
|
2218
2226
|
'@defaults backdrop-filter': {},
|
|
2219
|
-
'backdrop-filter':
|
|
2227
|
+
'backdrop-filter': cssBackdropFilterValue,
|
|
2220
2228
|
}
|
|
2221
2229
|
},
|
|
2222
2230
|
},
|
|
@@ -2231,7 +2239,7 @@ export let corePlugins = {
|
|
|
2231
2239
|
return {
|
|
2232
2240
|
'--tw-backdrop-hue-rotate': `hue-rotate(${value})`,
|
|
2233
2241
|
'@defaults backdrop-filter': {},
|
|
2234
|
-
'backdrop-filter':
|
|
2242
|
+
'backdrop-filter': cssBackdropFilterValue,
|
|
2235
2243
|
}
|
|
2236
2244
|
},
|
|
2237
2245
|
},
|
|
@@ -2246,7 +2254,7 @@ export let corePlugins = {
|
|
|
2246
2254
|
return {
|
|
2247
2255
|
'--tw-backdrop-invert': `invert(${value})`,
|
|
2248
2256
|
'@defaults backdrop-filter': {},
|
|
2249
|
-
'backdrop-filter':
|
|
2257
|
+
'backdrop-filter': cssBackdropFilterValue,
|
|
2250
2258
|
}
|
|
2251
2259
|
},
|
|
2252
2260
|
},
|
|
@@ -2261,7 +2269,7 @@ export let corePlugins = {
|
|
|
2261
2269
|
return {
|
|
2262
2270
|
'--tw-backdrop-opacity': `opacity(${value})`,
|
|
2263
2271
|
'@defaults backdrop-filter': {},
|
|
2264
|
-
'backdrop-filter':
|
|
2272
|
+
'backdrop-filter': cssBackdropFilterValue,
|
|
2265
2273
|
}
|
|
2266
2274
|
},
|
|
2267
2275
|
},
|
|
@@ -2276,7 +2284,7 @@ export let corePlugins = {
|
|
|
2276
2284
|
return {
|
|
2277
2285
|
'--tw-backdrop-saturate': `saturate(${value})`,
|
|
2278
2286
|
'@defaults backdrop-filter': {},
|
|
2279
|
-
'backdrop-filter':
|
|
2287
|
+
'backdrop-filter': cssBackdropFilterValue,
|
|
2280
2288
|
}
|
|
2281
2289
|
},
|
|
2282
2290
|
},
|
|
@@ -2291,7 +2299,7 @@ export let corePlugins = {
|
|
|
2291
2299
|
return {
|
|
2292
2300
|
'--tw-backdrop-sepia': `sepia(${value})`,
|
|
2293
2301
|
'@defaults backdrop-filter': {},
|
|
2294
|
-
'backdrop-filter':
|
|
2302
|
+
'backdrop-filter': cssBackdropFilterValue,
|
|
2295
2303
|
}
|
|
2296
2304
|
},
|
|
2297
2305
|
},
|
|
@@ -2299,35 +2307,22 @@ export let corePlugins = {
|
|
|
2299
2307
|
)
|
|
2300
2308
|
},
|
|
2301
2309
|
|
|
2302
|
-
backdropFilter: ({
|
|
2303
|
-
|
|
2304
|
-
'
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
'--tw-backdrop-sepia': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2314
|
-
'--tw-backdrop-filter': [
|
|
2315
|
-
'var(--tw-backdrop-blur)',
|
|
2316
|
-
'var(--tw-backdrop-brightness)',
|
|
2317
|
-
'var(--tw-backdrop-contrast)',
|
|
2318
|
-
'var(--tw-backdrop-grayscale)',
|
|
2319
|
-
'var(--tw-backdrop-hue-rotate)',
|
|
2320
|
-
'var(--tw-backdrop-invert)',
|
|
2321
|
-
'var(--tw-backdrop-opacity)',
|
|
2322
|
-
'var(--tw-backdrop-saturate)',
|
|
2323
|
-
'var(--tw-backdrop-sepia)',
|
|
2324
|
-
].join(' '),
|
|
2325
|
-
},
|
|
2310
|
+
backdropFilter: ({ addDefaults, addUtilities }) => {
|
|
2311
|
+
addDefaults('backdrop-filter', {
|
|
2312
|
+
'--tw-backdrop-blur': ' ',
|
|
2313
|
+
'--tw-backdrop-brightness': ' ',
|
|
2314
|
+
'--tw-backdrop-contrast': ' ',
|
|
2315
|
+
'--tw-backdrop-grayscale': ' ',
|
|
2316
|
+
'--tw-backdrop-hue-rotate': ' ',
|
|
2317
|
+
'--tw-backdrop-invert': ' ',
|
|
2318
|
+
'--tw-backdrop-opacity': ' ',
|
|
2319
|
+
'--tw-backdrop-saturate': ' ',
|
|
2320
|
+
'--tw-backdrop-sepia': ' ',
|
|
2326
2321
|
})
|
|
2327
2322
|
addUtilities({
|
|
2328
2323
|
'.backdrop-filter': {
|
|
2329
2324
|
'@defaults backdrop-filter': {},
|
|
2330
|
-
'backdrop-filter':
|
|
2325
|
+
'backdrop-filter': cssBackdropFilterValue,
|
|
2331
2326
|
},
|
|
2332
2327
|
'.backdrop-filter-none': { 'backdrop-filter': 'none' },
|
|
2333
2328
|
})
|