tailwindcss 0.0.0-insiders.f9fb2ce → 0.0.0-insiders.fb545bc
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 +84 -3
- package/colors.js +2 -1
- package/defaultConfig.js +2 -1
- package/defaultTheme.js +2 -1
- package/lib/cli.js +32 -32
- package/lib/constants.js +1 -1
- package/lib/corePluginList.js +4 -0
- package/lib/corePlugins.js +257 -172
- package/lib/css/preflight.css +4 -3
- package/lib/featureFlags.js +6 -4
- package/lib/lib/collapseDuplicateDeclarations.js +2 -2
- package/lib/lib/detectNesting.js +17 -2
- package/lib/lib/evaluateTailwindFunctions.js +9 -5
- package/lib/lib/expandApplyAtRules.js +26 -9
- package/lib/lib/expandTailwindAtRules.js +27 -1
- package/lib/lib/generateRules.js +64 -10
- package/lib/lib/resolveDefaultsAtRules.js +25 -11
- package/lib/lib/setupContextUtils.js +55 -78
- package/lib/lib/sharedState.js +1 -1
- package/lib/lib/substituteScreenAtRules.js +7 -4
- package/lib/util/buildMediaQuery.js +13 -24
- package/lib/util/createUtilityPlugin.js +2 -2
- package/lib/util/dataTypes.js +25 -3
- package/lib/util/defaults.js +6 -0
- package/lib/util/formatVariantSelector.js +93 -9
- package/lib/util/isValidArbitraryValue.js +64 -0
- package/lib/util/log.js +4 -0
- package/lib/util/nameClass.js +1 -0
- package/lib/util/normalizeConfig.js +41 -12
- package/lib/util/normalizeScreens.js +61 -0
- package/lib/util/parseBoxShadowValue.js +77 -0
- package/lib/util/pluginUtils.js +12 -11
- package/lib/util/resolveConfig.js +12 -12
- package/package.json +15 -14
- package/peers/index.js +3798 -3098
- package/plugin.js +2 -1
- package/resolveConfig.js +2 -1
- package/src/corePluginList.js +1 -1
- package/src/corePlugins.js +232 -164
- package/src/css/preflight.css +4 -3
- package/src/featureFlags.js +5 -1
- package/src/lib/detectNesting.js +22 -3
- package/src/lib/evaluateTailwindFunctions.js +5 -2
- package/src/lib/expandApplyAtRules.js +29 -2
- package/src/lib/expandTailwindAtRules.js +25 -0
- package/src/lib/generateRules.js +57 -0
- package/src/lib/resolveDefaultsAtRules.js +28 -7
- package/src/lib/setupContextUtils.js +45 -64
- package/src/lib/substituteScreenAtRules.js +6 -3
- package/src/util/buildMediaQuery.js +14 -18
- package/src/util/dataTypes.js +24 -6
- package/src/util/defaults.js +6 -0
- package/src/util/formatVariantSelector.js +92 -1
- package/src/util/isValidArbitraryValue.js +61 -0
- package/src/util/log.js +4 -0
- package/src/util/nameClass.js +1 -1
- package/src/util/normalizeConfig.js +14 -1
- package/src/util/normalizeScreens.js +45 -0
- package/src/util/parseBoxShadowValue.js +71 -0
- package/src/util/pluginUtils.js +2 -0
- package/stubs/defaultConfig.stub.js +23 -5
package/plugin.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
let createPlugin = require('./lib/public/create-plugin')
|
|
2
|
+
module.exports = (createPlugin.__esModule ? createPlugin : { default: createPlugin }).default
|
package/resolveConfig.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
let resolveConfig = require('./lib/public/resolve-config')
|
|
2
|
+
module.exports = (resolveConfig.__esModule ? resolveConfig : { default: resolveConfig }).default
|
package/src/corePluginList.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default ["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","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","fontSmoothing","placeholderColor","placeholderOpacity","caretColor","accentColor","opacity","backgroundBlendMode","mixBlendMode","boxShadow","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 default ["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","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"]
|
package/src/corePlugins.js
CHANGED
|
@@ -11,6 +11,8 @@ import isPlainObject from './util/isPlainObject'
|
|
|
11
11
|
import transformThemeValue from './util/transformThemeValue'
|
|
12
12
|
import { version as tailwindVersion } from '../package.json'
|
|
13
13
|
import log from './util/log'
|
|
14
|
+
import { normalizeScreens } from './util/normalizeScreens'
|
|
15
|
+
import { formatBoxShadowValue, parseBoxShadowValue } from './util/parseBoxShadowValue'
|
|
14
16
|
|
|
15
17
|
export let variantPlugins = {
|
|
16
18
|
pseudoElementVariants: ({ addVariant }) => {
|
|
@@ -22,6 +24,8 @@ export let variantPlugins = {
|
|
|
22
24
|
|
|
23
25
|
addVariant('file', '&::file-selector-button')
|
|
24
26
|
|
|
27
|
+
addVariant('placeholder', '&::placeholder')
|
|
28
|
+
|
|
25
29
|
addVariant('before', ({ container }) => {
|
|
26
30
|
container.walkRules((rule) => {
|
|
27
31
|
let foundContent = false
|
|
@@ -155,13 +159,17 @@ export let variantPlugins = {
|
|
|
155
159
|
},
|
|
156
160
|
|
|
157
161
|
screenVariants: ({ theme, addVariant }) => {
|
|
158
|
-
for (let screen
|
|
159
|
-
let
|
|
160
|
-
let query = buildMediaQuery(size)
|
|
162
|
+
for (let screen of normalizeScreens(theme('screens'))) {
|
|
163
|
+
let query = buildMediaQuery(screen)
|
|
161
164
|
|
|
162
|
-
addVariant(screen, `@media ${query}`)
|
|
165
|
+
addVariant(screen.name, `@media ${query}`)
|
|
163
166
|
}
|
|
164
167
|
},
|
|
168
|
+
|
|
169
|
+
orientationVariants: ({ addVariant }) => {
|
|
170
|
+
addVariant('portrait', '@media (orientation: portrait)')
|
|
171
|
+
addVariant('landscape', '@media (orientation: landscape)')
|
|
172
|
+
},
|
|
165
173
|
}
|
|
166
174
|
|
|
167
175
|
export let corePlugins = {
|
|
@@ -179,24 +187,10 @@ export let corePlugins = {
|
|
|
179
187
|
},
|
|
180
188
|
|
|
181
189
|
container: (() => {
|
|
182
|
-
function extractMinWidths(breakpoints) {
|
|
183
|
-
return
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
if (!Array.isArray(breakpoints)) {
|
|
189
|
-
breakpoints = [breakpoints]
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
return breakpoints
|
|
193
|
-
.filter((breakpoint) => {
|
|
194
|
-
return breakpoint?.hasOwnProperty?.('min') || breakpoint?.hasOwnProperty('min-width')
|
|
195
|
-
})
|
|
196
|
-
.map((breakpoint) => {
|
|
197
|
-
return breakpoint['min-width'] ?? breakpoint.min
|
|
198
|
-
})
|
|
199
|
-
})
|
|
190
|
+
function extractMinWidths(breakpoints = []) {
|
|
191
|
+
return breakpoints
|
|
192
|
+
.flatMap((breakpoint) => breakpoint.values.map((breakpoint) => breakpoint.min))
|
|
193
|
+
.filter((v) => v !== undefined)
|
|
200
194
|
}
|
|
201
195
|
|
|
202
196
|
function mapMinWidthsToPadding(minWidths, screens, paddings) {
|
|
@@ -225,16 +219,11 @@ export let corePlugins = {
|
|
|
225
219
|
}
|
|
226
220
|
|
|
227
221
|
for (let minWidth of minWidths) {
|
|
228
|
-
for (let
|
|
229
|
-
let
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
mapping.push({
|
|
234
|
-
screen,
|
|
235
|
-
minWidth,
|
|
236
|
-
padding: paddings[screen],
|
|
237
|
-
})
|
|
222
|
+
for (let screen of screens) {
|
|
223
|
+
for (let { min } of screen.values) {
|
|
224
|
+
if (min === minWidth) {
|
|
225
|
+
mapping.push({ minWidth, padding: paddings[screen.name] })
|
|
226
|
+
}
|
|
238
227
|
}
|
|
239
228
|
}
|
|
240
229
|
}
|
|
@@ -243,12 +232,12 @@ export let corePlugins = {
|
|
|
243
232
|
}
|
|
244
233
|
|
|
245
234
|
return function ({ addComponents, theme }) {
|
|
246
|
-
let screens = theme('container.screens', theme('screens'))
|
|
235
|
+
let screens = normalizeScreens(theme('container.screens', theme('screens')))
|
|
247
236
|
let minWidths = extractMinWidths(screens)
|
|
248
237
|
let paddings = mapMinWidthsToPadding(minWidths, screens, theme('container.padding'))
|
|
249
238
|
|
|
250
239
|
let generatePaddingFor = (minWidth) => {
|
|
251
|
-
let paddingConfig = paddings.find((padding) =>
|
|
240
|
+
let paddingConfig = paddings.find((padding) => padding.minWidth === minWidth)
|
|
252
241
|
|
|
253
242
|
if (!paddingConfig) {
|
|
254
243
|
return {}
|
|
@@ -514,49 +503,52 @@ export let corePlugins = {
|
|
|
514
503
|
],
|
|
515
504
|
{ supportsNegativeValues: true }
|
|
516
505
|
),
|
|
517
|
-
scale: createUtilityPlugin(
|
|
518
|
-
|
|
519
|
-
'scale',
|
|
520
|
-
[
|
|
521
|
-
['@defaults transform', {}],
|
|
522
|
-
'--tw-scale-x',
|
|
523
|
-
'--tw-scale-y',
|
|
524
|
-
['transform', 'var(--tw-transform)'],
|
|
525
|
-
],
|
|
526
|
-
],
|
|
506
|
+
scale: createUtilityPlugin(
|
|
507
|
+
'scale',
|
|
527
508
|
[
|
|
528
509
|
[
|
|
529
|
-
'scale
|
|
530
|
-
[
|
|
510
|
+
'scale',
|
|
511
|
+
[
|
|
512
|
+
['@defaults transform', {}],
|
|
513
|
+
'--tw-scale-x',
|
|
514
|
+
'--tw-scale-y',
|
|
515
|
+
['transform', 'var(--tw-transform)'],
|
|
516
|
+
],
|
|
531
517
|
],
|
|
532
518
|
[
|
|
533
|
-
|
|
534
|
-
|
|
519
|
+
[
|
|
520
|
+
'scale-x',
|
|
521
|
+
[['@defaults transform', {}], '--tw-scale-x', ['transform', 'var(--tw-transform)']],
|
|
522
|
+
],
|
|
523
|
+
[
|
|
524
|
+
'scale-y',
|
|
525
|
+
[['@defaults transform', {}], '--tw-scale-y', ['transform', 'var(--tw-transform)']],
|
|
526
|
+
],
|
|
535
527
|
],
|
|
536
528
|
],
|
|
537
|
-
|
|
529
|
+
{ supportsNegativeValues: true }
|
|
530
|
+
),
|
|
538
531
|
|
|
539
|
-
transform: ({
|
|
540
|
-
|
|
541
|
-
'
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
'--tw-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
].join(' '),
|
|
558
|
-
},
|
|
532
|
+
transform: ({ addDefaults, addUtilities }) => {
|
|
533
|
+
addDefaults('transform', {
|
|
534
|
+
'--tw-translate-x': '0',
|
|
535
|
+
'--tw-translate-y': '0',
|
|
536
|
+
'--tw-rotate': '0',
|
|
537
|
+
'--tw-skew-x': '0',
|
|
538
|
+
'--tw-skew-y': '0',
|
|
539
|
+
'--tw-scale-x': '1',
|
|
540
|
+
'--tw-scale-y': '1',
|
|
541
|
+
'--tw-transform': [
|
|
542
|
+
'translateX(var(--tw-translate-x))',
|
|
543
|
+
'translateY(var(--tw-translate-y))',
|
|
544
|
+
'rotate(var(--tw-rotate))',
|
|
545
|
+
'skewX(var(--tw-skew-x))',
|
|
546
|
+
'skewY(var(--tw-skew-y))',
|
|
547
|
+
'scaleX(var(--tw-scale-x))',
|
|
548
|
+
'scaleY(var(--tw-scale-y))',
|
|
549
|
+
].join(' '),
|
|
559
550
|
})
|
|
551
|
+
|
|
560
552
|
addUtilities({
|
|
561
553
|
'.transform': { '@defaults transform': {}, transform: 'var(--tw-transform)' },
|
|
562
554
|
'.transform-cpu': {
|
|
@@ -618,17 +610,52 @@ export let corePlugins = {
|
|
|
618
610
|
|
|
619
611
|
cursor: createUtilityPlugin('cursor'),
|
|
620
612
|
|
|
621
|
-
touchAction: ({ addUtilities }) => {
|
|
613
|
+
touchAction: ({ addDefaults, addUtilities }) => {
|
|
614
|
+
addDefaults('touch-action', {
|
|
615
|
+
'--tw-pan-x': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
616
|
+
'--tw-pan-y': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
617
|
+
'--tw-pinch-zoom': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
618
|
+
'--tw-touch-action': 'var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)',
|
|
619
|
+
})
|
|
620
|
+
|
|
622
621
|
addUtilities({
|
|
623
622
|
'.touch-auto': { 'touch-action': 'auto' },
|
|
624
623
|
'.touch-none': { 'touch-action': 'none' },
|
|
625
|
-
'.touch-pan-x': {
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
'.touch-pan-
|
|
631
|
-
|
|
624
|
+
'.touch-pan-x': {
|
|
625
|
+
'@defaults touch-action': {},
|
|
626
|
+
'--tw-pan-x': 'pan-x',
|
|
627
|
+
'touch-action': 'var(--tw-touch-action)',
|
|
628
|
+
},
|
|
629
|
+
'.touch-pan-left': {
|
|
630
|
+
'@defaults touch-action': {},
|
|
631
|
+
'--tw-pan-x': 'pan-left',
|
|
632
|
+
'touch-action': 'var(--tw-touch-action)',
|
|
633
|
+
},
|
|
634
|
+
'.touch-pan-right': {
|
|
635
|
+
'@defaults touch-action': {},
|
|
636
|
+
'--tw-pan-x': 'pan-right',
|
|
637
|
+
'touch-action': 'var(--tw-touch-action)',
|
|
638
|
+
},
|
|
639
|
+
'.touch-pan-y': {
|
|
640
|
+
'@defaults touch-action': {},
|
|
641
|
+
'--tw-pan-y': 'pan-y',
|
|
642
|
+
'touch-action': 'var(--tw-touch-action)',
|
|
643
|
+
},
|
|
644
|
+
'.touch-pan-up': {
|
|
645
|
+
'@defaults touch-action': {},
|
|
646
|
+
'--tw-pan-y': 'pan-up',
|
|
647
|
+
'touch-action': 'var(--tw-touch-action)',
|
|
648
|
+
},
|
|
649
|
+
'.touch-pan-down': {
|
|
650
|
+
'@defaults touch-action': {},
|
|
651
|
+
'--tw-pan-y': 'pan-down',
|
|
652
|
+
'touch-action': 'var(--tw-touch-action)',
|
|
653
|
+
},
|
|
654
|
+
'.touch-pinch-zoom': {
|
|
655
|
+
'@defaults touch-action': {},
|
|
656
|
+
'--tw-pinch-zoom': 'pinch-zoom',
|
|
657
|
+
'touch-action': 'var(--tw-touch-action)',
|
|
658
|
+
},
|
|
632
659
|
'.touch-manipulation': { 'touch-action': 'manipulation' },
|
|
633
660
|
})
|
|
634
661
|
},
|
|
@@ -651,11 +678,9 @@ export let corePlugins = {
|
|
|
651
678
|
})
|
|
652
679
|
},
|
|
653
680
|
|
|
654
|
-
scrollSnapType: ({
|
|
655
|
-
|
|
656
|
-
'
|
|
657
|
-
'--tw-scroll-snap-strictness': 'proximity',
|
|
658
|
-
},
|
|
681
|
+
scrollSnapType: ({ addDefaults, addUtilities }) => {
|
|
682
|
+
addDefaults('scroll-snap-type', {
|
|
683
|
+
'--tw-scroll-snap-strictness': 'proximity',
|
|
659
684
|
})
|
|
660
685
|
|
|
661
686
|
addUtilities({
|
|
@@ -1152,22 +1177,21 @@ export let corePlugins = {
|
|
|
1152
1177
|
})
|
|
1153
1178
|
},
|
|
1154
1179
|
|
|
1155
|
-
borderColor: ({
|
|
1180
|
+
borderColor: ({ addDefaults, matchUtilities, theme, corePlugins }) => {
|
|
1156
1181
|
if (!corePlugins('borderOpacity')) {
|
|
1157
1182
|
let value = theme('borderColor.DEFAULT', 'currentColor')
|
|
1158
|
-
|
|
1159
|
-
'
|
|
1160
|
-
'border-color': toColorValue(value),
|
|
1161
|
-
},
|
|
1183
|
+
addDefaults('border-width', {
|
|
1184
|
+
'border-color': toColorValue(value),
|
|
1162
1185
|
})
|
|
1163
1186
|
} else {
|
|
1164
|
-
|
|
1165
|
-
'
|
|
1187
|
+
addDefaults(
|
|
1188
|
+
'border-width',
|
|
1189
|
+
withAlphaVariable({
|
|
1166
1190
|
color: theme('borderColor.DEFAULT', 'currentColor'),
|
|
1167
1191
|
property: 'border-color',
|
|
1168
1192
|
variable: '--tw-border-opacity',
|
|
1169
|
-
})
|
|
1170
|
-
|
|
1193
|
+
})
|
|
1194
|
+
)
|
|
1171
1195
|
}
|
|
1172
1196
|
|
|
1173
1197
|
matchUtilities(
|
|
@@ -1370,8 +1394,10 @@ export let corePlugins = {
|
|
|
1370
1394
|
|
|
1371
1395
|
boxDecorationBreak: ({ addUtilities }) => {
|
|
1372
1396
|
addUtilities({
|
|
1373
|
-
'.decoration-slice': { 'box-decoration-break': 'slice' },
|
|
1374
|
-
'.decoration-clone': { 'box-decoration-break': 'clone' },
|
|
1397
|
+
'.decoration-slice': { 'box-decoration-break': 'slice' }, // Deprecated
|
|
1398
|
+
'.decoration-clone': { 'box-decoration-break': 'clone' }, // Deprecated
|
|
1399
|
+
'.box-decoration-slice': { 'box-decoration-break': 'slice' },
|
|
1400
|
+
'.box-decoration-clone': { 'box-decoration-break': 'clone' },
|
|
1375
1401
|
})
|
|
1376
1402
|
},
|
|
1377
1403
|
|
|
@@ -1628,9 +1654,10 @@ export let corePlugins = {
|
|
|
1628
1654
|
|
|
1629
1655
|
textDecoration: ({ addUtilities }) => {
|
|
1630
1656
|
addUtilities({
|
|
1631
|
-
'.underline': { 'text-decoration': 'underline' },
|
|
1632
|
-
'.
|
|
1633
|
-
'.
|
|
1657
|
+
'.underline': { 'text-decoration-line': 'underline' },
|
|
1658
|
+
'.overline': { 'text-decoration-line': 'overline' },
|
|
1659
|
+
'.line-through': { 'text-decoration-line': 'line-through' },
|
|
1660
|
+
'.no-underline': { 'text-decoration-line': 'none' },
|
|
1634
1661
|
})
|
|
1635
1662
|
},
|
|
1636
1663
|
|
|
@@ -1641,10 +1668,32 @@ export let corePlugins = {
|
|
|
1641
1668
|
return { 'text-decoration-color': toColorValue(value) }
|
|
1642
1669
|
},
|
|
1643
1670
|
},
|
|
1644
|
-
{ values: flattenColorPalette(theme('textDecorationColor')), type: ['color'
|
|
1671
|
+
{ values: flattenColorPalette(theme('textDecorationColor')), type: ['color'] }
|
|
1645
1672
|
)
|
|
1646
1673
|
},
|
|
1647
1674
|
|
|
1675
|
+
textDecorationStyle: ({ addUtilities }) => {
|
|
1676
|
+
addUtilities({
|
|
1677
|
+
'.decoration-solid': { 'text-decoration-style': 'solid' },
|
|
1678
|
+
'.decoration-double': { 'text-decoration-style': 'double' },
|
|
1679
|
+
'.decoration-dotted': { 'text-decoration-style': 'dotted' },
|
|
1680
|
+
'.decoration-dashed': { 'text-decoration-style': 'dashed' },
|
|
1681
|
+
'.decoration-wavy': { 'text-decoration-style': 'wavy' },
|
|
1682
|
+
})
|
|
1683
|
+
},
|
|
1684
|
+
|
|
1685
|
+
textDecorationThickness: createUtilityPlugin(
|
|
1686
|
+
'textDecorationThickness',
|
|
1687
|
+
[['decoration', ['text-decoration-thickness']]],
|
|
1688
|
+
{ type: ['length', 'percentage'] }
|
|
1689
|
+
),
|
|
1690
|
+
|
|
1691
|
+
textUnderlineOffset: createUtilityPlugin(
|
|
1692
|
+
'textUnderlineOffset',
|
|
1693
|
+
[['underline-offset', ['text-underline-offset']]],
|
|
1694
|
+
{ type: ['length', 'percentage'] }
|
|
1695
|
+
),
|
|
1696
|
+
|
|
1648
1697
|
fontSmoothing: ({ addUtilities }) => {
|
|
1649
1698
|
addUtilities({
|
|
1650
1699
|
'.antialiased': {
|
|
@@ -1768,13 +1817,12 @@ export let corePlugins = {
|
|
|
1768
1817
|
`var(--tw-shadow)`,
|
|
1769
1818
|
].join(', ')
|
|
1770
1819
|
|
|
1771
|
-
return function ({ matchUtilities,
|
|
1772
|
-
|
|
1773
|
-
'
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
},
|
|
1820
|
+
return function ({ matchUtilities, addDefaults, theme }) {
|
|
1821
|
+
addDefaults(' box-shadow', {
|
|
1822
|
+
'--tw-ring-offset-shadow': '0 0 #0000',
|
|
1823
|
+
'--tw-ring-shadow': '0 0 #0000',
|
|
1824
|
+
'--tw-shadow': '0 0 #0000',
|
|
1825
|
+
'--tw-shadow-colored': '0 0 #0000',
|
|
1778
1826
|
})
|
|
1779
1827
|
|
|
1780
1828
|
matchUtilities(
|
|
@@ -1782,18 +1830,43 @@ export let corePlugins = {
|
|
|
1782
1830
|
shadow: (value) => {
|
|
1783
1831
|
value = transformValue(value)
|
|
1784
1832
|
|
|
1833
|
+
let ast = parseBoxShadowValue(value)
|
|
1834
|
+
for (let shadow of ast) {
|
|
1835
|
+
// Don't override color if the whole shadow is a variable
|
|
1836
|
+
if (!shadow.valid) {
|
|
1837
|
+
continue
|
|
1838
|
+
}
|
|
1839
|
+
|
|
1840
|
+
shadow.color = 'var(--tw-shadow-color)'
|
|
1841
|
+
}
|
|
1842
|
+
|
|
1785
1843
|
return {
|
|
1786
1844
|
'@defaults box-shadow': {},
|
|
1787
1845
|
'--tw-shadow': value === 'none' ? '0 0 #0000' : value,
|
|
1846
|
+
'--tw-shadow-colored': value === 'none' ? '0 0 #0000' : formatBoxShadowValue(ast),
|
|
1788
1847
|
'box-shadow': defaultBoxShadow,
|
|
1789
1848
|
}
|
|
1790
1849
|
},
|
|
1791
1850
|
},
|
|
1792
|
-
{ values: theme('boxShadow') }
|
|
1851
|
+
{ values: theme('boxShadow'), type: ['shadow'] }
|
|
1793
1852
|
)
|
|
1794
1853
|
}
|
|
1795
1854
|
})(),
|
|
1796
1855
|
|
|
1856
|
+
boxShadowColor: ({ matchUtilities, theme }) => {
|
|
1857
|
+
matchUtilities(
|
|
1858
|
+
{
|
|
1859
|
+
shadow: (value) => {
|
|
1860
|
+
return {
|
|
1861
|
+
'--tw-shadow-color': toColorValue(value),
|
|
1862
|
+
'--tw-shadow': 'var(--tw-shadow-colored)',
|
|
1863
|
+
}
|
|
1864
|
+
},
|
|
1865
|
+
},
|
|
1866
|
+
{ values: flattenColorPalette(theme('boxShadowColor')), type: ['color'] }
|
|
1867
|
+
)
|
|
1868
|
+
},
|
|
1869
|
+
|
|
1797
1870
|
outlineStyle: ({ addUtilities }) => {
|
|
1798
1871
|
addUtilities({
|
|
1799
1872
|
'.outline-none': {
|
|
@@ -1827,7 +1900,7 @@ export let corePlugins = {
|
|
|
1827
1900
|
)
|
|
1828
1901
|
},
|
|
1829
1902
|
|
|
1830
|
-
ringWidth: ({ matchUtilities,
|
|
1903
|
+
ringWidth: ({ matchUtilities, addDefaults, addUtilities, theme }) => {
|
|
1831
1904
|
let ringOpacityDefault = theme('ringOpacity.DEFAULT', '0.5')
|
|
1832
1905
|
let ringColorDefault = withAlphaValue(
|
|
1833
1906
|
theme('ringColor.DEFAULT'),
|
|
@@ -1835,16 +1908,15 @@ export let corePlugins = {
|
|
|
1835
1908
|
`rgb(147 197 253 / ${ringOpacityDefault})`
|
|
1836
1909
|
)
|
|
1837
1910
|
|
|
1838
|
-
|
|
1839
|
-
'
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
},
|
|
1911
|
+
addDefaults('ring-width', {
|
|
1912
|
+
'--tw-ring-inset': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
1913
|
+
'--tw-ring-offset-width': theme('ringOffsetWidth.DEFAULT', '0px'),
|
|
1914
|
+
'--tw-ring-offset-color': theme('ringOffsetColor.DEFAULT', '#fff'),
|
|
1915
|
+
'--tw-ring-color': ringColorDefault,
|
|
1916
|
+
'--tw-ring-offset-shadow': '0 0 #0000',
|
|
1917
|
+
'--tw-ring-shadow': '0 0 #0000',
|
|
1918
|
+
'--tw-shadow': '0 0 #0000',
|
|
1919
|
+
'--tw-shadow-colored': '0 0 #0000',
|
|
1848
1920
|
})
|
|
1849
1921
|
|
|
1850
1922
|
matchUtilities(
|
|
@@ -2051,30 +2123,28 @@ export let corePlugins = {
|
|
|
2051
2123
|
)
|
|
2052
2124
|
},
|
|
2053
2125
|
|
|
2054
|
-
filter: ({
|
|
2055
|
-
|
|
2056
|
-
'
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
'--tw-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
].join(' '),
|
|
2077
|
-
},
|
|
2126
|
+
filter: ({ addDefaults, addUtilities }) => {
|
|
2127
|
+
addDefaults('filter', {
|
|
2128
|
+
'--tw-blur': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2129
|
+
'--tw-brightness': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2130
|
+
'--tw-contrast': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2131
|
+
'--tw-grayscale': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2132
|
+
'--tw-hue-rotate': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2133
|
+
'--tw-invert': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2134
|
+
'--tw-saturate': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2135
|
+
'--tw-sepia': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2136
|
+
'--tw-drop-shadow': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2137
|
+
'--tw-filter': [
|
|
2138
|
+
'var(--tw-blur)',
|
|
2139
|
+
'var(--tw-brightness)',
|
|
2140
|
+
'var(--tw-contrast)',
|
|
2141
|
+
'var(--tw-grayscale)',
|
|
2142
|
+
'var(--tw-hue-rotate)',
|
|
2143
|
+
'var(--tw-invert)',
|
|
2144
|
+
'var(--tw-saturate)',
|
|
2145
|
+
'var(--tw-sepia)',
|
|
2146
|
+
'var(--tw-drop-shadow)',
|
|
2147
|
+
].join(' '),
|
|
2078
2148
|
})
|
|
2079
2149
|
addUtilities({
|
|
2080
2150
|
'.filter': { '@defaults filter': {}, filter: 'var(--tw-filter)' },
|
|
@@ -2217,30 +2287,28 @@ export let corePlugins = {
|
|
|
2217
2287
|
)
|
|
2218
2288
|
},
|
|
2219
2289
|
|
|
2220
|
-
backdropFilter: ({
|
|
2221
|
-
|
|
2222
|
-
'
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
'--tw-backdrop-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
].join(' '),
|
|
2243
|
-
},
|
|
2290
|
+
backdropFilter: ({ addDefaults, addUtilities }) => {
|
|
2291
|
+
addDefaults('backdrop-filter', {
|
|
2292
|
+
'--tw-backdrop-blur': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2293
|
+
'--tw-backdrop-brightness': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2294
|
+
'--tw-backdrop-contrast': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2295
|
+
'--tw-backdrop-grayscale': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2296
|
+
'--tw-backdrop-hue-rotate': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2297
|
+
'--tw-backdrop-invert': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2298
|
+
'--tw-backdrop-opacity': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2299
|
+
'--tw-backdrop-saturate': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2300
|
+
'--tw-backdrop-sepia': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2301
|
+
'--tw-backdrop-filter': [
|
|
2302
|
+
'var(--tw-backdrop-blur)',
|
|
2303
|
+
'var(--tw-backdrop-brightness)',
|
|
2304
|
+
'var(--tw-backdrop-contrast)',
|
|
2305
|
+
'var(--tw-backdrop-grayscale)',
|
|
2306
|
+
'var(--tw-backdrop-hue-rotate)',
|
|
2307
|
+
'var(--tw-backdrop-invert)',
|
|
2308
|
+
'var(--tw-backdrop-opacity)',
|
|
2309
|
+
'var(--tw-backdrop-saturate)',
|
|
2310
|
+
'var(--tw-backdrop-sepia)',
|
|
2311
|
+
].join(' '),
|
|
2244
2312
|
})
|
|
2245
2313
|
addUtilities({
|
|
2246
2314
|
'.backdrop-filter': {
|
package/src/css/preflight.css
CHANGED
|
@@ -144,7 +144,7 @@ sup {
|
|
|
144
144
|
table {
|
|
145
145
|
text-indent: 0; /* 1 */
|
|
146
146
|
border-color: inherit; /* 2 */
|
|
147
|
-
border-collapse: collapse;
|
|
147
|
+
border-collapse: collapse; /* 3 */
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
/*
|
|
@@ -288,7 +288,8 @@ legend {
|
|
|
288
288
|
}
|
|
289
289
|
|
|
290
290
|
ol,
|
|
291
|
-
ul
|
|
291
|
+
ul,
|
|
292
|
+
menu {
|
|
292
293
|
list-style: none;
|
|
293
294
|
margin: 0;
|
|
294
295
|
padding: 0;
|
|
@@ -309,7 +310,7 @@ textarea {
|
|
|
309
310
|
|
|
310
311
|
input::placeholder,
|
|
311
312
|
textarea::placeholder {
|
|
312
|
-
opacity: 1;
|
|
313
|
+
opacity: 1; /* 1 */
|
|
313
314
|
color: theme('colors.gray.400', #9ca3af); /* 2 */
|
|
314
315
|
}
|
|
315
316
|
|
package/src/featureFlags.js
CHANGED
|
@@ -2,7 +2,11 @@ import chalk from 'chalk'
|
|
|
2
2
|
import log from './util/log'
|
|
3
3
|
|
|
4
4
|
let defaults = {
|
|
5
|
-
|
|
5
|
+
// TODO: Drop this once we can safely rely on optimizeUniversalDefaults being
|
|
6
|
+
// the default.
|
|
7
|
+
optimizeUniversalDefaults: process.env.NODE_ENV === 'test' ? true : false,
|
|
8
|
+
|
|
9
|
+
// optimizeUniversalDefaults: true
|
|
6
10
|
}
|
|
7
11
|
|
|
8
12
|
let featureFlags = {
|