File tree Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ module.exports = function tailwindcss(configOrPath) {
66
66
minify : false ,
67
67
sourceMap : ! ! intermediateMap ,
68
68
targets : lightningcss . browserslistToTargets ( browserslist ( browsersListConfig ) ) ,
69
+ errorRecovery : true ,
69
70
drafts : {
70
71
customMedia : true ,
71
72
} ,
Original file line number Diff line number Diff line change @@ -18,26 +18,25 @@ test('arbitrary values', () => {
18
18
// before it generated invalid CSS without throwing an error.
19
19
//
20
20
// In perfect world, we would not generate anything, and potentially show a warning.
21
- test . skip ( 'arbitrary values that result in invalid CSS should not be generated' , ( ) => {
21
+ test ( 'arbitrary values that result in invalid CSS should not be generated' , ( ) => {
22
22
let config = {
23
23
content : [
24
24
{
25
- raw : html `<div class= "w-[{}] w-[{{}}]" > </ div> ` ,
25
+ raw : html `<div class= "w-full w- [{}] w-[{{}}] [--custom:{ }]" > </ div> ` ,
26
26
} ,
27
27
] ,
28
28
}
29
29
30
+ // NOTE: The version with braces are invalid and therefore produce nothing
30
31
return run ( '@tailwind utilities' , config ) . then ( ( result ) => {
32
+ // Required because it tries to reformat the {}
33
+ // prettier-ignore
31
34
return expect ( result . css ) . toMatchFormattedCss ( css `
32
- .w- \[\{\{\}\}\] {
33
- width : {
34
- {
35
- }
36
- }
37
- }
38
- .w- \[\{\}\] {
39
- width : {
40
- }
35
+ .w-full {
36
+ width : 100% ;
37
+ }
38
+ .\[--custom \:\{\}\] {
39
+ --custom : {}
41
40
}
42
41
` )
43
42
} )
You can’t perform that action at this time.
0 commit comments