This report describes a problem encountered when using Tailwind CSS's @apply
directive to apply styles from a child component to its parent element. The expected behavior is that the parent element should inherit the styles applied using @apply
, but this is not happening consistently.
@apply
.@apply
in the child component.The parent element should inherit the styles defined in the child component using the @apply
directive.
The parent element does not inherit the styles. The styles are only applied to the child component.
The issue may stem from the way Tailwind processes styles, or potential conflicts between component styles and global styles. Possible solutions involve using JavaScript to inject styles, or reviewing the CSS specificity of applied styles to ensure they are correctly cascading.