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) {
6666 minify : false ,
6767 sourceMap : ! ! intermediateMap ,
6868 targets : lightningcss . browserslistToTargets ( browserslist ( browsersListConfig ) ) ,
69+ errorRecovery : true ,
6970 drafts : {
7071 customMedia : true ,
7172 } ,
Original file line number Diff line number Diff line change @@ -18,26 +18,25 @@ test('arbitrary values', () => {
1818// before it generated invalid CSS without throwing an error.
1919//
2020// 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' , ( ) => {
2222 let config = {
2323 content : [
2424 {
25- raw : html `<div class= "w-[{}] w-[{{}}]" > </ div> ` ,
25+ raw : html `<div class= "w-full w- [{}] w-[{{}}] [--custom:{ }]" > </ div> ` ,
2626 } ,
2727 ] ,
2828 }
2929
30+ // NOTE: The version with braces are invalid and therefore produce nothing
3031 return run ( '@tailwind utilities' , config ) . then ( ( result ) => {
32+ // Required because it tries to reformat the {}
33+ // prettier-ignore
3134 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 : {}
4140 }
4241 ` )
4342 } )
You can’t perform that action at this time.
0 commit comments