@@ -50,6 +50,13 @@ module.exports = (options = { debug: false }) => {
5050 return rule . remove ( ) ;
5151 }
5252
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+
5360 // remove rules with unsupported selectors
5461 if ( ! isSupportedSelector ( rule . selector ) ) {
5562 return rule . remove ( ) ;
@@ -99,6 +106,18 @@ module.exports = (options = { debug: false }) => {
99106 }
100107 }
101108
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+
102121 // replace vertical-align: middle
103122 // with vertical-align: center
104123 if ( decl . prop === "vertical-align" ) {
@@ -219,6 +238,12 @@ const supportedProperties = {
219238 "margin-left" : true ,
220239 "margin-right" : true ,
221240 "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 ,
222247 "min-height" : true ,
223248 "min-width" : true ,
224249 "off-background-color" : true ,
0 commit comments