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

Implement fallback plugins when arbitrary values result in css from multiple plugins #9376

Merged
merged 14 commits into from
Sep 29, 2022

Commits on Sep 29, 2022

  1. Configuration menu
    Copy the full SHA
    57768a2 View commit details
    Browse the repository at this point in the history
  2. choose backgroundSize over backgroundPosition

    Ensure that `backgroundColor` can take any value
    RobinMalfait committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    14e3cd5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f754b26 View commit details
    Browse the repository at this point in the history
  4. implement fallback plugins

    Whenever an arbitrary value results in css from multiple plugins we
    first try to resolve a falback plugin.
    
    The fallback mechanism works like this:
    
    - If A has type `any` and B has type `color`, then B should win.
    
      > This is because `A` will match *anything*, but the more precise type
        should win instead. E.g.: `backgroundColor` has the type `any` so
        `bg-[100px_200px]` would match both the `backgroundColor` and
        `backgroundSize` but `backgroundSize` matched because of a specific
        type and not because of the `any` type.
    - If A has type `length` and B has type `[length, { disambiguate: true }]`, then B should win.
      > This is because `B` marked the `length` as the plugin that should
        win in case a clash happens.
    RobinMalfait committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    a604415 View commit details
    Browse the repository at this point in the history
  5. Add any type to a handful of plugins

    Needs tests tho
    thecrypticace authored and RobinMalfait committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    14b273a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    255376f View commit details
    Browse the repository at this point in the history
  7. Add test for any type

    thecrypticace authored and RobinMalfait committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    9d48abf View commit details
    Browse the repository at this point in the history
  8. Split on multiple lines

    thecrypticace authored and RobinMalfait committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    3c19b51 View commit details
    Browse the repository at this point in the history
  9. fixup

    thecrypticace authored and RobinMalfait committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    327643c View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    bb06500 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    1a22db2 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    eb24bc1 View commit details
    Browse the repository at this point in the history
  13. update changelog

    RobinMalfait committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    94b8fab View commit details
    Browse the repository at this point in the history
  14. annotate any-type test with a bit more information

    Just for future debugging reasons!
    RobinMalfait committed Sep 29, 2022
    Configuration menu
    Copy the full SHA
    0b356be View commit details
    Browse the repository at this point in the history