@@ -50,6 +50,13 @@ module.exports = (options = { debug: false }) => {
50
50
return rule . remove ( ) ;
51
51
}
52
52
53
+ // replace :root and :host pseudo selector, introduced in Tailwind 4+ with .ns-root for var handling.
54
+ if ( rule . selector . includes ( ":root" ) || rule . selector . includes ( ":host" ) ) {
55
+ rule . selectors = rule . selectors . map ( ( selector ) =>
56
+ selector . replace ( / : r o o t / , ".ns-root" ) . replace ( / : h o s t / , ".ns-root" )
57
+ ) ;
58
+ }
59
+
53
60
// remove rules with unsupported selectors
54
61
if ( ! isSupportedSelector ( rule . selector ) ) {
55
62
return rule . remove ( ) ;
@@ -99,6 +106,18 @@ module.exports = (options = { debug: false }) => {
99
106
}
100
107
}
101
108
109
+ // invalid with core 8.8+ at moment
110
+ // Note: could be supported at somepoint
111
+ if ( decl . prop === "placeholder-color" && decl . value ?. includes ( "color-mix" ) ) {
112
+ return decl . remove ( ) ;
113
+ }
114
+
115
+ // invalid with core 8.8+ at moment
116
+ // Note: could be supported at somepoint
117
+ if ( decl . value ?. includes ( "currentColor" ) ) {
118
+ return decl . remove ( ) ;
119
+ }
120
+
102
121
// replace vertical-align: middle
103
122
// with vertical-align: center
104
123
if ( decl . prop === "vertical-align" ) {
@@ -219,6 +238,12 @@ const supportedProperties = {
219
238
"margin-left" : true ,
220
239
"margin-right" : true ,
221
240
"margin-top" : true ,
241
+ "margin-block" : true ,
242
+ "margin-block-start" : true ,
243
+ "margin-block-end" : true ,
244
+ "margin-inline" : true ,
245
+ "margin-inline-start" : true ,
246
+ "margin-inline-end" : true ,
222
247
"min-height" : true ,
223
248
"min-width" : true ,
224
249
"off-background-color" : true ,
0 commit comments