* Update config.d.ts, Make array members partial in Config
Instead of `Partial<Array<Thing>>` have `Array<Partial<Thing>>`
* simplify types further
* update changelog
---------
Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
* parse the `calc()`-like expressions and format them
* update changelog
* Add test case for double negatives
wanted to be sure this worked
---------
Co-authored-by: Jordan Pittman <jordan@cryptica.me>
* move `preflight` tests to `plugins` test folder
* move `container` tests to `plugins` test folder
* add a test that ensures that all built-in plugins have tests
This is based on a few assumptions:
1. All plugins exist in the `corePlugins.js` file and are exported as
`corePlugins`
2. Each exported plugin in that object has a file with a corresponding
name in the current (`tests/plugins/`) folder
* add dedicated plugin tests in the `plugins` folder
* add a test that ensures that all built-in variant plugins have tests
This is based on a few assumptions:
1. All variant plugins exist in the `corePlugins.js` file and are
exported as `variantPlugins`
2. Each exported plugin in that object has a file with a corresponding
name in the current (`tests/plugins/variants/`) folder
* add dedicated variant plugin tests in the `plugins/variants` folder
* cleanup basic usage test
* move existing animation tests to animation plugin tests
* move `apply-important-selector` tests to more appropriate location
When you have a custom config for the prefix/separator values, then we
want to disable the `oxideParser` for now. But we also have to ensure
that if you use the value `"all"` for the experimental feature flag that
we enable all feature flags.
We were using the keys of the array instead of the values.
* make main plugin async
This way we can improve the `fs.readFileSync` to a bunch of
`fs.promises.readFile` in a `Promise.all` instead.
* make CLI plugin async
* update CHANGELOG
* Refactor
* Sort based on first occurence of a candidate
This primarily affects components and utilities which contain multiple matched classes
* Simplify
* Update changelog
* Update
* Refactor
* Don’t prefix classes in arbitrary values for group and peer
* use `foo` instead of `lol`
* handle the prefix inside the group/peer variants
Then add the `NoPrefix` feature to the variant itself, which will skip
prefixing any other class in the generated selector (because we already
took care of prefixing `.group` and `.peer`).
We are using an internal symbol such that:
- We can keep it as a private API
- We don't introduce a breaking change
* refactor to simple object instead
We will still use a symbol as an internal/private marker, but the data
itself will be a simple object for now.
If we want to refactor this (and more) in the future using bitflags then
we can refactor that in a separate PR.
---------
Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
* always prepend the Tailwind License
Even when you are not using preflight.
* drop the Tailwind License from the preflight plugin
* drop the license in the tests
This allows us to focus on the actual generated CSS without the license.
The license also includes the version number which we would have to
update every time we release a new version.
* update the source maps snapshots
* always prepend the license when using the CLI
* update Tailwind CLI integration test
* use `defaults` for `browserslist`
+ some features that we require for Tailwind to work.
* simplify Lightning CSS features
Always transpile `Nesting`, never transpile `LogicalProperties`.
* bump caniuse-lite (`npx browserslist@latest --update-db`)
* reflect changes in the tests
* update changelog
* exclude `Features.LogicalProperties` lightningcss feature
We don't want this to automatically apply since we have dedicated
logical property based utilities already.
We also have a feature flag to toggle some utilities to make use of
logical property based ones.
This feature should be opt-in to prevent backwards compatibility (e.g.:
RTL sites that _did_ use a mr-4 explicitly).
* update default browserslist
* explicitly include/exclude Lightning CSS features
* update tests based on new browserslist and include/exclude features from Lightning CSS
* update integration tests
* prefer user browserslist, fallback to built-in browserslist
* always include Nesting
If a custom browserslist config is used, then we don't explicitly set
the include/exclude features from Lightning CSS (except for nesting, we
always want to process nesting)
* ensure to fallback to the current working directory
* update changelog
* add failling test using array syntax without space delimiter
* add Rust test with candidates in array without spaces
* Fix JS arrays without spaces
* make the `oxideParser` the default
* sync feature flags with reality
* use better example in tests to be more real
* skip failing tests in the RegEx parser
* update changelog
* make `clippy` happy
---------
Co-authored-by: Jordan Pittman <jordan@cryptica.me>