From 058a9256ae7eac9d331ec44e384e002365568bce Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Tue, 4 Jan 2022 11:29:33 -0500 Subject: [PATCH] Emit defaults from apply in css modules (#6875) * Emit defaults from apply in css modules * Update changelog --- CHANGELOG.md | 2 +- src/lib/expandTailwindAtRules.js | 27 ++++++++++++++++------- tests/apply.test.js | 37 ++++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 378e6569ff72..685018589e77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- Fix `@apply` in files without `@tailwind` directives ([#6580](https://github.com/tailwindlabs/tailwindcss/pull/6580)) +- Fix `@apply` in files without `@tailwind` directives ([#6580](https://github.com/tailwindlabs/tailwindcss/pull/6580), [#6875](https://github.com/tailwindlabs/tailwindcss/pull/6875)) - CLI: avoid unnecessary writes to output files ([#6550](https://github.com/tailwindlabs/tailwindcss/pull/6550)) ## [3.0.9] - 2022-01-03 diff --git a/src/lib/expandTailwindAtRules.js b/src/lib/expandTailwindAtRules.js index addf2c666169..9aa91f0e94fb 100644 --- a/src/lib/expandTailwindAtRules.js +++ b/src/lib/expandTailwindAtRules.js @@ -140,17 +140,28 @@ export default function expandTailwindAtRules(context) { variants: null, } - // Make sure this file contains Tailwind directives. If not, we can save - // a lot of work and bail early. Also we don't have to register our touch - // file as a dependency since the output of this CSS does not depend on - // the source of any templates. Think Vue