File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change
1
+ import dedent from 'dedent'
1
2
import { css , json , test } from '../utils'
2
3
3
4
test (
76
77
await fs . expectFileToContain ( 'src/index.css' , css ` @import 'tailwindcss'; ` )
77
78
} ,
78
79
)
80
+
81
+ test (
82
+ 'migrate @layer utilities' ,
83
+ {
84
+ fs : {
85
+ 'package.json' : json `
86
+ {
87
+ "dependencies": {
88
+ "tailwindcss": "workspace:^",
89
+ "@tailwindcss/upgrade": "workspace:^"
90
+ }
91
+ }
92
+ ` ,
93
+ 'src/index.css' : css `
94
+ @import 'tailwindcss';
95
+
96
+ @layer utilities {
97
+ .no-scrollbar::-webkit-scrollbar {
98
+ display: none;
99
+ }
100
+
101
+ .no-scrollbar {
102
+ -ms-overflow-style: none;
103
+ scrollbar-width: none;
104
+ }
105
+ }
106
+ ` ,
107
+ } ,
108
+ } ,
109
+ async ( { fs, exec } ) => {
110
+ await exec ( 'npx @tailwindcss/upgrade' )
111
+
112
+ await fs . expectFileToContain (
113
+ 'src/index.css' ,
114
+ dedent `
115
+ @utility no-scrollbar {
116
+ &::-webkit-scrollbar {
117
+ display: none;
118
+ }
119
+ -ms-overflow-style: none;
120
+ scrollbar-width: none
121
+ }
122
+ ` ,
123
+ )
124
+ } ,
125
+ )
You can’t perform that action at this time.
0 commit comments