@webmate-studio/builder 0.2.94 → 0.2.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/css-deduplicator.js +12 -1
package/package.json
CHANGED
package/src/css-deduplicator.js
CHANGED
|
@@ -143,7 +143,18 @@ export function deduplicateCSS(cssArray) {
|
|
|
143
143
|
duplicatesSkipped++;
|
|
144
144
|
continue;
|
|
145
145
|
} else {
|
|
146
|
-
|
|
146
|
+
// Check if this looks like a Tailwind utility class
|
|
147
|
+
// Pattern: .class-name { property: value; }
|
|
148
|
+
// Examples: .border-2, .my-4, .text-red-500, .hover\:bg-blue-500
|
|
149
|
+
const isTailwindUtility = /^\.[a-z][a-z0-9\-\\:]*\s*\{/.test(trimmed);
|
|
150
|
+
|
|
151
|
+
if (isTailwindUtility) {
|
|
152
|
+
// Treat as utility - add to utilities layer
|
|
153
|
+
tailwindLayers.utilities.add(trimmed);
|
|
154
|
+
} else {
|
|
155
|
+
// Component-specific styles (not utilities)
|
|
156
|
+
regularRules.other.push(trimmed);
|
|
157
|
+
}
|
|
147
158
|
}
|
|
148
159
|
}
|
|
149
160
|
}
|