Skip to content

Consider migrating away from @apply #3028

@benjaminleonard

Description

@benjaminleonard

Adam Wathan considers it a bit of an anti-pattern — and it does cause issues with readability on some of our components. See the button.css and Button.tsx. It can be unclear where something is defined, and prone to clashes and issues with class overrides. Most recently I spotted this in a couple places during the last Tailwind upgrade where subtle class order changes can affect its apparance.

If you agree this is worth doing (@david-crespo and @charliepark) it might be good to do it incrementally. One component at a time rather than a mega-PR with more surface area to break at once.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions