diff --git a/scripts/post-build.js b/scripts/post-build.js index 2723184..5a16809 100644 --- a/scripts/post-build.js +++ b/scripts/post-build.js @@ -11,10 +11,10 @@ function shouldSkip(c) { // Icons if (c.includes('fa-') || c.includes('icon-fa')) return true; if (c.startsWith('not-')) return true; - // Border - if (c.includes('border')) return true; - // Widths - if (c.startsWith('max-w-')) return true; + + // Skip arbitrary values entirely - can't reliably replace in CSS + if (c.includes('[')) return true; + return false; } @@ -48,7 +48,7 @@ function processFile(filePath) { }); }); - // Second pass: replace in HTML +// Second pass: replace in HTML matches.forEach(m => { const arr = m.slice(7, -1).split(' ').filter(c => c); const newArr = arr.map(c => shouldSkip(c) ? c : classMap[c]); @@ -58,41 +58,43 @@ function processFile(filePath) { } }); - // Third pass: replace in ALL CSS (both