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

Ensure the percentage data type is validated correctly #8015

Merged
merged 2 commits into from Apr 1, 2022

Commits on Apr 1, 2022

  1. ensure the percentage data type is validated correctly

    When checking for our data types, we have to make sure that each part is
    correct, this wasn't happening for the `percentage` data type, which
    meant that `top_right_50%` was a valid percentage value because it ended
    in `%` which is not correct.
    
    Because of this, the generated code was non-existent because we got a
    warning:
    
      The class `bg-[top_right_50%]` is ambiguous and matches multiple utilities.
         Use `bg-[length:top_right_50%]` for `background-size: top right 50%`
         Use `bg-[position:top_right_50%]` for `background-position: top right 50%`
       If this is content and not a class, replace it with `bg-[top_right_50%]` to silence this warning.
    
    But this is not correct because this can never be a valid background
    size due to the `top right` section.
    
    This fixes it by validating each part individually, and now we get
    generated css.
    RobinMalfait committed Apr 1, 2022
    Copy the full SHA
    7d50d4c View commit details
    Browse the repository at this point in the history
  2. update changelog

    RobinMalfait committed Apr 1, 2022
    Copy the full SHA
    7a6522f View commit details
    Browse the repository at this point in the history