Skip to content

tailwindcss v3.4.2 included breaking changes around @apply #1416

@jagthedrummer

Description

@jagthedrummer

In #1386 @depfu tried to update tailwindcss to version 3.4.2 and CI is failing for that PR with this error.

CssSyntaxError: .../bullet_train-themes-light-1.6.38/app/assets/stylesheets/light/tailwind/components.css:179:5:
  The `button-alternative` class cannot be used with `@apply` because `@apply` does
  not currently support nested CSS.
  Rewrite the selector without nesting or configure the `tailwindcss/nesting` plugin:
  https://tailwindcss.com/docs/using-with-preprocessors#nesting

  at .../bullet_train-themes-light-1.6.38/app/assets/stylesheets/light/tailwind/components.css:42:5

The issue seems to be that the @apply directive was updated here: tailwindlabs/tailwindcss#13325

Given that this happened in a patch level version bump it seems like we might be hitting unexpected breakage, so I've opened an issue on the tailwind repo: tailwindlabs/tailwindcss#13433

Hopefully this is a bug that can be resolved on the tailwind side. If not we may need to rewrite some CSS in order to upgrade tailwindcss past version 3.4.1 (the last version that doesn't throw this error during the build step).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions