mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
Fix @import url() being stripped (#16144)
This commit is contained in:
parent
50bafce756
commit
b7436f8b59
@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
- Nothing yet!
|
||||
### Fixed
|
||||
|
||||
- Fix `@import url()` being stripped ([#16144](https://github.com/tailwindlabs/tailwindcss/pull/16144))
|
||||
|
||||
## [4.0.2] - 2025-01-31
|
||||
|
||||
|
||||
@ -142,6 +142,7 @@ it('should not emit empty rules once optimized', () => {
|
||||
@layer foo, bar, baz;
|
||||
@custom-media --modern (color), (hover);
|
||||
@namespace 'http://www.w3.org/1999/xhtml';
|
||||
@import url('https://fonts.googleapis.com/css2?family=Cedarville+Cursive&display=swap');
|
||||
`)
|
||||
|
||||
expect(toCss(ast)).toMatchInlineSnapshot(`
|
||||
@ -174,6 +175,7 @@ it('should not emit empty rules once optimized', () => {
|
||||
@layer foo, bar, baz;
|
||||
@custom-media --modern (color), (hover);
|
||||
@namespace 'http://www.w3.org/1999/xhtml';
|
||||
@import url('https://fonts.googleapis.com/css2?family=Cedarville+Cursive&display=swap');
|
||||
"
|
||||
`)
|
||||
|
||||
@ -182,6 +184,7 @@ it('should not emit empty rules once optimized', () => {
|
||||
@layer foo, bar, baz;
|
||||
@custom-media --modern (color), (hover);
|
||||
@namespace 'http://www.w3.org/1999/xhtml';
|
||||
@import url('https://fonts.googleapis.com/css2?family=Cedarville+Cursive&display=swap');
|
||||
"
|
||||
`)
|
||||
})
|
||||
|
||||
@ -306,7 +306,8 @@ export function optimizeAst(ast: AstNode[]) {
|
||||
copy.name === '@layer' ||
|
||||
copy.name === '@charset' ||
|
||||
copy.name === '@custom-media' ||
|
||||
copy.name === '@namespace'
|
||||
copy.name === '@namespace' ||
|
||||
copy.name === '@import'
|
||||
) {
|
||||
parent.push(copy)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user