diff --git a/CHANGELOG.md b/CHANGELOG.md index e1b147fae..d8d05d228 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Support TypeScript for `@plugin` and `@config` files ([#14317](https://github.com/tailwindlabs/tailwindcss/pull/14317)) - Add `default` option to `@theme` to support overriding default theme values from plugins/JS config files ([#14327](https://github.com/tailwindlabs/tailwindcss/pull/14327)) +- Add support for ` + `, + }, + }, + async ({ fs, spawn, getFreePort }) => { + let port = await getFreePort() + await spawn(`pnpm astro dev --port ${port}`) + + await retryAssertion(async () => { + let css = await fetchStyles(port) + expect(css).toContain(candidate`underline`) + }) + + await fs.write( + 'src/pages/index.astro', + html` +
Hello, world!
+ + + `, + ) + await retryAssertion(async () => { + let css = await fetchStyles(port) + expect(css).toContain(candidate`underline`) + expect(css).toContain(candidate`font-bold`) + }) + }, +) diff --git a/packages/@tailwindcss-vite/src/index.ts b/packages/@tailwindcss-vite/src/index.ts index 65d863548..8a1c60932 100644 --- a/packages/@tailwindcss-vite/src/index.ts +++ b/packages/@tailwindcss-vite/src/index.ts @@ -262,7 +262,10 @@ function getExtension(id: string) { function isPotentialCssRootFile(id: string) { let extension = getExtension(id) - let isCssFile = extension === 'css' || (extension === 'vue' && id.includes('&lang.css')) + let isCssFile = + extension === 'css' || + (extension === 'vue' && id.includes('&lang.css')) || + (extension === 'astro' && id.includes('&lang.css')) return isCssFile }