File tree 3 files changed +8
-2
lines changed
3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [ Unreleased]
9
9
10
- - Nothing yet!
10
+ ### Fixed
11
+
12
+ - Fix ` @import url() ` being stripped ([ #16144 ] ( https://github.com/tailwindlabs/tailwindcss/pull/16144 ) )
11
13
12
14
## [ 4.0.2] - 2025-01-31
13
15
Original file line number Diff line number Diff line change @@ -142,6 +142,7 @@ it('should not emit empty rules once optimized', () => {
142
142
@layer foo, bar, baz;
143
143
@custom-media --modern (color), (hover);
144
144
@namespace 'http://www.w3.org/1999/xhtml' ;
145
+ @import url ('https://fonts.googleapis.com/css2?family=Cedarville+Cursive&display=swap' );
145
146
` )
146
147
147
148
expect ( toCss ( ast ) ) . toMatchInlineSnapshot ( `
@@ -174,6 +175,7 @@ it('should not emit empty rules once optimized', () => {
174
175
@layer foo, bar, baz;
175
176
@custom-media --modern (color), (hover);
176
177
@namespace 'http://www.w3.org/1999/xhtml';
178
+ @import url('https://fonts.googleapis.com/css2?family=Cedarville+Cursive&display=swap');
177
179
"
178
180
` )
179
181
@@ -182,6 +184,7 @@ it('should not emit empty rules once optimized', () => {
182
184
@layer foo, bar, baz;
183
185
@custom-media --modern (color), (hover);
184
186
@namespace 'http://www.w3.org/1999/xhtml';
187
+ @import url('https://fonts.googleapis.com/css2?family=Cedarville+Cursive&display=swap');
185
188
"
186
189
` )
187
190
} )
Original file line number Diff line number Diff line change @@ -306,7 +306,8 @@ export function optimizeAst(ast: AstNode[]) {
306
306
copy . name === '@layer' ||
307
307
copy . name === '@charset' ||
308
308
copy . name === '@custom-media' ||
309
- copy . name === '@namespace'
309
+ copy . name === '@namespace' ||
310
+ copy . name === '@import'
310
311
) {
311
312
parent . push ( copy )
312
313
}
You can’t perform that action at this time.
0 commit comments