From 40a2d40fa216f9f916df013b262fe5defb1ae365 Mon Sep 17 00:00:00 2001 From: David Ernst Date: Thu, 13 Jun 2024 04:38:59 -0700 Subject: [PATCH] Fix typo in doc/recipes.md --- docs/recipes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/recipes.md b/docs/recipes.md index 134478a8..6478b1ac 100644 --- a/docs/recipes.md +++ b/docs/recipes.md @@ -49,7 +49,7 @@ Note that by using the `extend` object we're only adding our custom classes to t I don't recommend using Tailwind's `@apply` directive for classes that might get processed with tailwind-merge. -tailwind-merge would need to be configured so that it knows about which classes `.btn-primary` is in conflict with. This means: If someone adds another Tailwind class to the `@apply` directive, the tailwind-merge config would need to get modified accordignly, keeping it in sync with the written CSS. This easy-to-miss dependency is fragile and can lead to bugs with incorrect merging behavior. +tailwind-merge would need to be configured so that it knows about which classes `.btn-primary` is in conflict with. This means: If someone adds another Tailwind class to the `@apply` directive, the tailwind-merge config would need to get modified accordingly, keeping it in sync with the written CSS. This easy-to-miss dependency is fragile and can lead to bugs with incorrect merging behavior. Instead of creating custom CSS classes, I recommend keeping the collection of Tailwind classes in a string variable in JavaScript and access it whenever you want to apply those styles. This way you can reuse the collection of styles but don't need to touch the tailwind-merge config.