* Cleanup code
This makes it more explicit that we’re parsing a string selector, modifying it, and turning it back into a string
* Fix important modifier when :where is involved
* Only parse selector list once when handling the important modifier
* Fix import
* Fix lint errors
* Update rimraf to version 4.1.2
* use rimraf sync API
Our `oxide` engine uses rimraf v4, our `stable` engine uses rimraf v3
and the API is different in both. However the tests are currently shared
for both engines so we have to use the correct API for the correct
version.
However, we can also just use the `sync` API.
More info: https://github.com/isaacs/rimraf#major-changes-from-v3-to-v4
---------
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
* Revert "add caption-side utilities (#10470)"
This reverts commit f395cc4ae5c90eab90a722f42c7fda6ba8ece94e.
* Revert "Add support for configuring default `font-variation-settings` for a `font-family` (#10515)"
This reverts commit 8bd2846b5b906904a49e9ffec9c317e560f2eaa6.
* Revert "feat: add hyphens (#10071)"
This reverts commit f58a43fd75e8344b4c2cd0d34fa7b563b1f3ef3a.
* Revert "Add logical properties support for inline direction"
* Revert "Add `delay-0` and `duration-0` by default"
* Revert "Support using variables as arbitrary values without `var()`"
* Revert "Add `line-height` modifier support to `font-size` utilities"
* Add support for configuring default `font-variation-settings` for a `font-family`
* update changelog
---------
Co-authored-by: Nikolai Grushkovsky <n@ngrushkovsky.com>
* sort by `layer` inside `variants` layer
We currently have a whole system for sorting the utilties / components
already. Right now we also have a "variants" layer, this is to ensure
that we always have variants at the end of the file regardless of the
`parentLayer` (base, utilties, components).
That said, we also have to make sure that within this `variants` layer
we also sort by the `parentLayer`.
* update changelog
* ensure order is correct now
* drop empty lines when diffing output
* replace expected css with optimized lightningcss output
Lightning CSS generates a more optimal CSS output.
Right now the tests are setup in a way that both the generated css and
expected css are run through `lightningcss` to make sure that the output
is concistent for the `stable` and `oxide` engines. But this also means
that the expected output _could_ be larger (aka not optimized) and still
matches (after it runs through lightningcss).
By replacing this with the more optimal output we achieve a few things:
1. This better reflects reality since we will be using `lightningcss`.
2. This gets rid of unnecessary css.
3. Removed code!
* bump lightningcss
* use `lightningcss` in the main PostCss Plugin
* use lightningcss in our custom matchers
Now that we are using `lightningcss` and nesting in the new `oxide`
engine, the generated output _will_ be different in the majority of test
cases.
Using a combination of `prettier` and `lightningcss` will make the
output consistent.
The moment we are fully using the `oxide` engine, we can drop
`lightningcss` or `prettier` again to improve the performance of the
tests.
* update tests to apply `lightningcss` related changes
* update changelog
* add `lightningcss` and `browserslist` as dev dependencies to stable package.json
* only use `lightningcss` in tests (without prettier)
We will only fallback to prettier if lightningcss fails somehow.
* apply side effect chagnes due to only using lightningcss for tests
* make CI happy (integration tests)
Apply changes to integration tests now that we are using lightningcss
* transform `lightningcss` for Node 12 when running tests
* run prettier on failing tests for `toMatchFormattedCss`
This will result in better diffs because diffs are typically per block
and/or per line. But lightningcss will simplify certain selectors and
the diff won't be as clear.
We will only apply the prettier formatting for failing tests in the diff
view so that diffs are cleaner and we don't pay for the additional
prettier calls when tests pass.
* Handle group/peer variants with quoted strings
* Fix CS
* Use `splitAtTopLevelOnly` instead
This solution isn’t that pretty but it is reusing existing machinery
* inline return
Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
* Fix return type
Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
* Fixup
* Update changelog
Co-authored-by: Robin Malfait <malfait.robin@gmail.com>