This repository demonstrates a bug encountered when using Tailwind CSS's @apply
directive with classes that have conflicting styles. The issue arises from the order in which classes are applied, leading to unpredictable styling results.
When multiple classes with conflicting styles are applied using @apply
, the final style is determined by the order of the classes. This can lead to unexpected behavior and make it difficult to maintain consistent styling.
bug.css
to see the conflicting styles.bugSolution.css
to see the solution.The solution involves using more specific classes or creating custom utility classes to avoid style conflicts.