Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose context.sortClassList(classes) #7412

Merged
merged 5 commits into from Feb 10, 2022
Merged

Commits on Feb 10, 2022

  1. add prettier-plugin-tailwindcss

    This will use the prettier plugin in our tests as well, yay consistency!
    RobinMalfait committed Feb 10, 2022
    Copy the full SHA
    ba80553 View commit details
    Browse the repository at this point in the history
  2. ensure that both group and peer can't be used in @apply

    This was only configured for `group`
    RobinMalfait committed Feb 10, 2022
    Copy the full SHA
    5807529 View commit details
    Browse the repository at this point in the history
  3. expose sortClassList on the context

    This function will be used by the `prettier-plugin-tailwindcss` plugin,
    this way the sorting happens within Tailwind CSS itself adn the
    `prettier-plugin-tailwindcss` plugin doesn't have to use internal /
    private APIs.
    
    The signature looks like this:
    ```ts
    function sortClassList(classes: string[]): string[]
    ```
    
    E.g.:
    ```js
    let sortedClasses = context.sortClassList(['p-1', 'm-1', 'container'])
    ```
    RobinMalfait committed Feb 10, 2022
    Copy the full SHA
    a441d91 View commit details
    Browse the repository at this point in the history
  4. update changelog

    RobinMalfait committed Feb 10, 2022
    Copy the full SHA
    974d543 View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    ba5a562 View commit details
    Browse the repository at this point in the history