File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
packages/@tailwindcss-upgrade/src Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -1560,7 +1560,7 @@ test(
15601560 ` ,
15611561 'tailwind.config.js' : js `module .exports = {}` ,
15621562 'src/index.css' : css `
1563- @import 'tailwindcss/utilities ' ;
1563+ @import 'tailwindcss/components ' ;
15641564
15651565 /* No layer expected */
15661566 @import './my-components.css' ;
@@ -1571,7 +1571,7 @@ test(
15711571 /* Expecting a layer */
15721572 @import './my-other.css' ;
15731573
1574- @import 'tailwindcss/components ' ;
1574+ @import 'tailwindcss/utilities ' ;
15751575 ` ,
15761576 'src/my-components.css' : css `
15771577 @layer components {
@@ -1600,16 +1600,16 @@ test(
16001600 expect ( await fs . dumpFiles ( './src/**/*.css' ) ) . toMatchInlineSnapshot ( `
16011601 "
16021602 --- ./src/index.css ---
1603- @import 'tailwindcss/utilities' layer(utilities);
1604-
16051603 /* No layer expected */
16061604 @import './my-components.css';
16071605
16081606 /* No layer expected */
16091607 @import './my-utilities.css';
16101608
16111609 /* Expecting a layer */
1612- @import './my-other.css' layer(utilities);
1610+ @import './my-other.css' layer(components);
1611+
1612+ @import 'tailwindcss/utilities' layer(utilities);
16131613
16141614 --- ./src/my-components.css ---
16151615 @utility foo {
Original file line number Diff line number Diff line change @@ -158,8 +158,8 @@ async function run() {
158158 )
159159 if ( ! importedSheet ) continue
160160
161- // Only remove the `layer(…)` next to the import, if any of the children
162- // contains an `@utility`. Otherwise the `@utility` will not be top-level.
161+ // Only remove the `layer(…)` next to the import if any of the children
162+ // contain `@utility`. Otherwise `@utility` will not be top-level.
163163 if (
164164 ! importedSheet . containsRule ( ( node ) => node . type === 'atrule' && node . name === 'utility' )
165165 ) {
You can’t perform that action at this time.
0 commit comments