tailwindcss/packages/@tailwindcss-upgrade
Robin Malfait 2b13547a0d
Migrate arbitrary values to bare values (#14669)
This PR adds a codemod that can convert arbitrary values to the cleaner
bare values if we can.

For example, some classes use arbitrary values such as `col-start-[16]`,
but in v4 we have bare values for some plugins that don't really need to
adhere to your design system.

In this case, we can convert `col-start-[16]` to just `col-start-16`.

Another use case is for utilities that use fractions. For example the
`aspect-*` plugin.

A custom aspect ratio such as `aspect-[16/9]` can be converted to
`aspect-16/9`.

There are some rules attached to this migration:

1. We can only migrate arbitrary values that is a single positive
integer, or an arbitrary value that is a fraction where the numerator
and denominator are both positive integers.
2. We make sure that some CSS can be generated once its converted to a
bare value.
2024-10-15 09:45:03 +00:00
..
2024-09-18 16:45:43 +02:00

Tailwind CSS

A utility-first CSS framework for rapidly building custom user interfaces.

Build Status Total Downloads Latest Release License


Documentation

For full documentation, visit tailwindcss.com.

Community

For help, discussion about best practices, or any other conversation that would benefit from being searchable:

Discuss Tailwind CSS on GitHub

For chatting with others using the framework:

Join the Tailwind CSS Discord Server

Contributing

If you're interested in contributing to Tailwind CSS, please read our contributing docs before submitting a pull request.