File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,20 @@ module.exports = (options = { debug: false }) => {
4545 media ( mediaAtRule ) {
4646 mediaAtRule . remove ( ) ;
4747 } ,
48+
49+ // Tailwind v4 wraps most output in @layer blocks (base/theme/utilities).
50+ // NativeScript's CSS engine does not implement CSS Cascade Layers,
51+ // so rules inside @layer would otherwise be ignored.
52+ //
53+ // Flatten those layers by lifting their child rules into the parent,
54+ // preserving order so specificity/cascade still work as expected.
55+ layer ( layerAtRule ) {
56+ if ( ! layerAtRule . nodes || ! layerAtRule . nodes . length ) {
57+ return layerAtRule . remove ( ) ;
58+ }
59+
60+ layerAtRule . replaceWith ( ...layerAtRule . nodes ) ;
61+ } ,
4862 } ,
4963 // Uncomment to debug the final output
5064 // OnceExit(rule) {
You can’t perform that action at this time.
0 commit comments