TailwindCSS--apply-Directive-Issue-with-Pseudo-classes-408le Tailwind Templates

Tailwindcss Apply Directive Issue With Pseudo Classes 408le

TailwindCSS @apply directive issue with pseudo-class selectors causing unexpected styling behavior. Styles aren't applied to child elements as expected.

TailwindCSS @apply Directive Issue with Pseudo-classes

This repository demonstrates a problem encountered when using Tailwind's @apply directive with pseudo-classes like &:hover. The issue stems from the direct application of the pseudo-class to the parent element, rather than inheriting to its children. This leads to an unexpected application of styles. The solution outlines a workaround to achieve the desired result.

Top categories

Loading Svelte Themes