1818 Commits

Author SHA1 Message Date
Robin Malfait
b1f4da70d1
Separate stable and oxide engines (#10359)
* separate `stable` and `oxide` mode (package.json in this case)

* drop `install` script (we use a workspace now)

* change required engine to 16

* enable OXIDE by default

* ignore generated `oxide` files

* splitup package.json scripts into "public" and "private" scripts

Not ideal of course, but this should make it a tiny bit easier to know
which scripts _you_ as a developer / contributor have to run.

* drop `workspaces` from the `stable` engine

* drop `oxide` related build files from the `stable` engine

* drop `oxide` engine specific dependencies from the `stable` engine

* use the `oxide-node-api-shim` for the `stable` engine

* add little script to swap the engines

* drop `oxide:build` from `turbo` config

* configure `ci` for `stable` and `oxide` engines

- rename `nodejs.yml` -> `ci.yml`
- add `ci-stable.yml` (for stable mode and Node 12)
- ensure to use the `stable` engine in the `ci-stable.yml` workflow
- drop `oxide:___` specific scripts

* rename `release-insiders` to `release-insiders-stable`

This way we will be able to remove all files that contain `stable` once
we are ready.

* rename `release-insiders-oxide` to just `release-insiders`

* cleanup insider related workflows

* rename `release` -> `release-stable`

* rename `release-oxide` -> `release`

* change names of release workflows

* drop `oxide-` prefix from jobs

* inline node versions

* do not use `turbo` for the stable build

Can't use it because we don't have a workspace in the stable build.

* re-rename CI workflow

* encode default engine in relevant `package.json` files

* make Node 12 work

* increase `node-version` matrix

* make release workflows explicit (per engine)

* add `Oxide` to workflow name

* add integration tests for the `oxide` engine

* add integration tests for the `stable` engine

* run `oxide` integrations against node `18`

* run `stable` integration tests against node 18

We should test node 12 for tailwindcss, but integrations itself can run
against a newer version. In fact, we always ran them against node 16.

* use `localhost` instead of `0.0.0.0`

* ensure `webpack-4` works on Node 18

* run relese scripst directly

Instead of going via `npm`. It's a bit nicer and quicker!

* drop unused scripts

* sync package-lock.json

* ensure to generate the plugin list before running `jest`

We _could_ use an `npm run pretest`, but then you can't run `jest`
directly anymore (which is required for some tools like vscode
extensions).

* cleanup npm scripts

* drop pretend comments

* fix typo

* add `build:rust` as a pre-jest run script
2023-01-19 11:58:25 -05:00
Jordan Pittman
91b4b93866
Allow variants with slashes in the name (#10336)
* Check for full variant before checking for modifier

* Update changelog
2023-01-16 14:41:34 -05:00
Adam Wathan
9e34619dd6
Add logical properties support for inline direction (#10166)
* ensure we use `npm@7` for older versions of Node.js

This is important so that we can guarantee that `workspaces` are
supported which we depend on right now (just for install purposes).

* tmp: trigger CI build (GitHub is doing funky things and not working right now)

* drop Node.js 12 from Node.js CI workflow

* focus on Node.js 16 for now

* Revert "tmp: trigger CI build (GitHub is doing funky things and not working right now)"

This reverts commit a3deed472da498f8a52404b2e8ccbc16f0e93101.

* WIP

* Add support for logical properties in inline direction

* Add scroll-margin/scroll-padding utilities

* Update CHANGELOG

* Rename inset-s/e to start/end

* Update sort order in test

* Use logical properties for space/divide in Oxide

* run non-oxide and OXIDE tests

+ fix oxide version tests

* drop oxide specific test job

The normal `npm run test` will already include the non-oxide and oxide
version when running tests.

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
2023-01-16 18:57:42 +01:00
Robin Malfait
2a403267d8
Oxide (#10252)
* temporarily disable workflows

* add oxide

Our Rust related parts

* use oxide

- Setup the codebase to be able to use the Rust parts based on an
  environment variable: `OXIDE=1`.
- Setup some tests that run both the non-Rust and Rust version in the
  same test.
- Sort the candidates in a consistent way, to guarantee the order for
  now (especially in tests).
- Reflect sorting related changes in tests.
- Ensure tests run in both the Rust and non-Rust version. (Some tests
  are explicitly skipped when using the Rust version since we haven't
  implemented those features yet. These include: custom prefix,
  transformers and extractors).
  - `jest`
  -`OXIDE=1 jest`

* remove into_par_iter where it doesn't make sense

* cargo fmt

* wip

* enable tracing based on `DEBUG` env

* improve CI for the Oxide build

* sort test output

This happened because the sorting happens in this branch, but changes
happened on the `master` branch.

* add failing tests

I noticed that some of the tests were failing, and while looking at
them, it happened because the tests were structured like this:

```html
    <div
      class="
        backdrop-filter
        backdrop-filter-none
        backdrop-blur-lg
        backdrop-brightness-50
        backdrop-contrast-0
        backdrop-grayscale
        backdrop-hue-rotate-90
        backdrop-invert
        backdrop-opacity-75
        backdrop-saturate-150
        backdrop-sepia
      "
    ></div>
```

This means that the class names themselves eventually end up like this: `backdrop-filter-none\n`
-> (Notice the `\n`)

/cc @thecrypticace

* fix range to include `\n`

* Include only unique values for tests

Really, what we care about most is that the list contains every expected candidate. Not necessarily how many times it shows up because while many candidates will show up A LOT in a source text we’ll unique them before passing them back to anything that needs them

* Fix failing tests

* Don’t match empty arbitrary values

* skip tests in oxide mode regarding custom separators in arbitrary variants

* re-enable workflows

* use `@tailwindcss/oxide` dependency

* publish `tailwindcss@oxide`

* drop prepublishOnly

I don't think we actually need this anymore (or even want because this
is trying to do things in CI that we don't want to happen. Aka, build
the Oxide Rust code, it is already a dependency).

* WIP

* Defer to existing CLI for Oxide

* Include new compiled typescript stuff when publishing

* Move TS to ./src/oxide

* Update scripts

* Clean up tests for TS

* copy `cli` to `oxide/cli`

* make CLI files TypeScript files

* drop --postcss flag

* setup lightningcss

* Remove autoprefixer and cssnano from oxide CLI

* cleanup Rust code a little bit

- Drop commented out code
- Drop 500 fixture templates

* sort test output

* re-add `prepublishOnly` script

* bump SWC dependencies in package-lock.json

* pin `@swc` dependencies

* ensure to install and build oxide

* update all GitHub Workflows to reflect Oxide required changes

* sort `content-resolution` integration tests

* add `Release Insiders — Oxide`

* setup turbo repo + remote caching

* use `npx` to invoke `turbo`

* setup unique/proper package names for integration tests

* add missing `isomorphic-fetch` dependency

* setup integration tests to use `turborepo`

* scope tailwind tasks to root workspace

* re-enable `node_modules` cache for integration tests

* re-enable `node_modules` cache for main CI workflow

* split cache for `main` and `oxide` node_modules

* fix indent

* split install dependencies so that they can be cached individually

* improve GitHub actions caching

* use correct path for oxide node_modules (crates/node)

* ensure that `cargo install` always succeeds

cargo install X, on CI will fail if it already exists.

* figure out integration tests with turbo

* tmp: use `npm` instead of `turbo`

* disable `fail-fast`

This will allow us to run integration tests so that it still caches the
succesful ones.

* YAML OH YAML, Y U WHITESPACE SENSITIVE

* copy the oxide-ci workflow to release-oxide

* make `oxide-ci` a normal CI workflow

Without publishing

* try to cache cargo and node_modules for the oxide build

* configure turbo to run scripts in the root

* explicitly skip failing test for the Oxide version

* run oxide tests in CI

* only use build script for root package

* sync package-lock.json

* do not cache node_modules for each individual integration

* look for hoisted `.bin`

* use turbo for caching build tailwind css in integration tests

* Robin...

* try to use the local binary first

* skip installing integration test dependencies

Should already be installed due to workspace usage

* Robin...

* drop `output.clean`

* explicitly add `mini-css-extract-plugin`

* drop oxide-ci, this is tested by proxy

* ensure oxide build is used in integration tests

This will ensure the `@tailwindcss/oxide` dependency is available
(whether we use it or not).

* setup Oxide shim in insiders release

* add browserslist dependency

* use `install:all` script name

Just using `install` as a script name will be called when running
`npm install`.
Now that we marked the repo as a `workspace`, `npm install` will run
install in all workspaces which is... not ideal.

* tmp: enable insiders release in PRs

Just to check if everything works before merging. Can be removed once
tested.

* don't cache node_modules?

I feel there is some catch 22 going on here.
We require `npm install` to build the `oxide/crates/node` version.
But we also require `oxide/crates/node` for the `npm install` becaus of
the dependency: `"@tailwindcss/oxide": "file:oxide/creates/node"`

* try to use `oxide/crates/node` as part of the workspace

* let's think about this

Let's try and cache the `node_modules` and share as much as possible.
However, some scripts still need to be installed specific to the OS.

Running `npm install` locally doesn't throw away your `node_modules`,
so if we just cache `node_modules` but also run `npm install` that
should keep as much as possible and still improve install times since
`node_modules` is already there.

I think.

* ensure generated `index.js` and `index.d.ts` files are considered outputs

* use `npx napi` instead of `napi` directly

* include all `package-lock.json` files

* normalize caching further in all workflows

* drop nested `package-lock.json` files

* `npm uninstall mini-css-extract-plugin && npm install mini-css-extract-plugin --save-dev`

* bump webpack-5 integration tests dependencies

* only release insiders on `master` branch

* tmp: let's figure out release insiders oxide

* fix little typo

* use Node 18 for Oxide Insiders

* syncup package-lock.json

* let's try node 16

Node 18 currently fails on `Build x86_64-unknown-linux-gnu (OXIDE)`
Workflow.

Install Node.JS output:

```
Environment details
Warning: /__t/node/18.13.0/x64/bin/node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by /__t/node/18.13.0/x64/bin/node)
/__t/node/18.13.0/x64/bin/node: /lib64/libc.so.6: version `GLIBC_2.25' not found (required by /__t/node/18.13.0/x64/bin/node)
/__t/node/18.13.0/x64/bin/node: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by /__t/node/18.13.0/x64/bin/node)
/__t/node/18.13.0/x64/bin/node: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /__t/node/18.13.0/x64/bin/node)
/__t/node/18.13.0/x64/bin/node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /__t/node/18.13.0/x64/bin/node)
/__t/node/18.13.0/x64/bin/node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /__t/node/18.13.0/x64/bin/node)

Warning: node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by node)
node: /lib64/libc.so.6: version `GLIBC_2.25' not found (required by node)
node: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by node)
node: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by node)
node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by node)
node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by node)
```

* bump some Node versions

* only release oxide insiders on `master` branch

* don't cache `npm`

* bump napi-rs

Co-authored-by: Jordan Pittman <jordan@cryptica.me>
Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
2023-01-13 12:22:00 +01:00
Jordan Pittman
6f45428cc1
Consider earlier variants before sorting functions (#10288)
* Consider earlier variants before sorting functions

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>

* Update changelog

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2023-01-10 09:57:11 -05:00
Jordan Pittman
6ad3945fe7
Escape group names in selectors (#10276)
* Handle escaped selector characters in parseVariantFormatString

* Escape group names in selectors

Otherwise special characters would break O_O

* Update changelog
2023-01-09 11:14:16 -05:00
Jordan Pittman
ec5136c19a
Fix perf regression when checking for changed content (#10234)
* Commit changes to mod time cache all at once

This allows us to track changes in files that are both a context and content dependency in a way that preserves file mod checking optimizations

* fixup
2023-01-03 15:45:51 -05:00
Jordan Pittman
7d8eb21de6
Don't prefix classes in arbitrary variants (#10214)
* Add tests

* Refactor

refactor

* Allow `prefixSelector` to take an AST

* Consider multiple formats in `finalizeSelector`

The functions `finalizeSelector` and `formatVariantSelector` together were using a mix for AST and string-based parsing. This now does the full transformation using the selector AST. This also parses the format strings AST as early as possible and is set up to parse them only once for a given set of rules.

All of this will allow considering metadata per format string. For instance, we now know if the format string `.foo &` was produced by a normal variant or by an arbitrary variant. We use this information to control the prefixing behavior for individual format strings.

* Update changelog

* Cleanup code a bit
2023-01-03 09:40:47 -05:00
Robin Malfait
2b885ef252
Allow direct nesting in root or @layer nodes (#10229)
* hide nesting warnings in `root` or `@layer` nodes

* update changelog
2023-01-03 12:38:30 +01:00
Jordan Pittman
3a8e95d848
Match arbitrary properties even when followed by square bracketed text (#10212)
* Match arbitrary properties even when followed by square bracketed text

* Update changelog
2023-01-02 09:43:07 -05:00
Jordan Pittman
51b6224e6a
Update list of length units (#10100)
* Update length units

* Update changelog
2022-12-16 10:16:12 -05:00
sibbng
ce7ac96e88
Properly handle subtraction followed by a variable in arbitrary values (#10074)
* fix normalizing subtraction followed by a variable

* Add test

* Update changelog

Co-authored-by: Jordan Pittman <jordan@cryptica.me>
2022-12-14 09:27:34 -05:00
Jordan Pittman
25d17db78c
Prevent invalid arbitrary variant selectors from failing the build (#10059)
* Refactor

* Prevent invalid arbitrary variant selectors from failing the build

* Update changelog

* Fix CS
2022-12-12 11:03:53 -05:00
Jordan Pittman
cea08380dc
Sort arbitrary variants deterministically regardless of content order (#10016)
* Fix off-by-one error in variant sort mapping

This didn’t actually have any negative effect because of how it was implemented. But it only happened to work right :D

* Make arbitrary variant sorting deterministic

* Update changelog

* Use faster byte-order comparison

We really only care that the order is _always_ the same. localeCompare is still locale dependent based on environment. This ensures it’s dependent on content only.

* Fix CS
2022-12-08 09:05:46 -05:00
Robin Malfait
fde30c307e
use decl.prop instead of undefined decl.name
While working on TypeScript types in the oxide version, I noticed that
we used `decl.name`, which is not defined... oops!
2022-12-08 13:50:06 +01:00
Jordan Pittman
c515a91f58
Don’t reorder webkit scrollbar pseudo elements (#9991)
* Don’t reorder webkit scrollbar pseudo elements

In reality, we need to stop reordering pseudo elements completely as `::before:hover` and `::after:hover` are 100% valid and should work per the CSS selector spec even though no browser currently supports it.

* Update changelog
2022-12-02 12:18:23 -05:00
Jordan Pittman
e8b036567d
Clip unbalanced closing brackets in arbitrary values (#9973)
* Properly clip when there are too many `]` characters

* Update changelog
2022-12-01 09:43:55 -05:00
Adam Wathan
cbbfa827a4
Support variable shorthand for arbitrary modifiers (#9962)
* Support variable shorthand for arbitrary modifiers

* Update changelog

Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
2022-11-29 16:06:58 -05:00
Jordan Pittman
1d23dcbe92
Add --watch=always option to prevent exit when stdin closes (#9966)
* Support `--flag=value` syntax for manually-parsed CLI args

* Don’t exit when stdin closes if using `--watch=always`

* Update changelog
2022-11-29 14:57:07 -05:00
nakajima a.k.a. nazomikan
705d21397c
Support renaming of output files by PostCSS plugin. (#9944)
* Support for rename of output files by postcss plugin.

* update changelog

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2022-11-29 11:17:39 +01:00
Robin Malfait
ab47cee503
drop withAlpha on theme (#9906) 2022-11-25 14:03:50 +01:00
Adam Wathan
b5f5adf3f5
Support using variables as arbitrary values without var() (#9880)
* Support using variables as arbitrary values without var()

* Update changelog

* Add tests for variable fallback values

Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
2022-11-22 10:24:39 -05:00
Adam Wathan
ea10bb9d41
Add line-height modifier for font-size utilities (#9875)
* Add line-height modifier for font-size utilities

* Add test for arbitrary values

* Add failing test for non-configured modifier values

* Add more tests (including failing case)

* Remove unused code

* Add note + failing test

* Remove unused code

* Fix test

* Fix test

* Update changelog

Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
2022-11-22 09:37:07 -05:00
Adam Wathan
cdbaa740f0 Rename isValidArbitraryValue 2022-11-17 15:19:31 -05:00
Adam Wathan
e66110e6a3 Remove non-obvious unreachable code, add test 2022-11-17 12:54:28 -05:00
Robin Malfait
8b4471778b
Fix foo-[abc]/[def] not being handled correctl (#9866)
* fix `foo-[abc]/[def]` not being handled correctly

This commit does a bit of cleanup, it also ensures that we lookup
`[abc]/[def]` in the `values` first, and if it doesn't exist, then we
start parsing all the values out.

We also ensure that `abc` and `def` are parsed out correctly for the
correct type instead of dropping the rule altogether because we happen
to end up with an `any` rule.

TODO: we should further clean the whole type system because this should
only be used to figure out what type an arbitrary value is and to find
the corresponding plugin and that's it.
One of the fixes is doing a crazy lookup and running a generator, even
though we know it is a lookup value so we should be done with all the
work anyways.

* update changelog
2022-11-17 17:53:12 +01:00
Robin Malfait
30df062a85
Cleanup unused variantOrder (#9829)
* cleanup unused `variantOrder`

* update changelog
2022-11-14 12:18:44 +01:00
Jordan Pittman
602101d030
Allow users to block generation of certain utilities (#9812)
* Add blocklist tests

* Build initial implementation of blocklist

* wip

* wip

* wip

* Update changelog
2022-11-11 11:47:20 -05:00
Jordan Pittman
4ccc0fa12a
Make sure errors are always displayed when watching for changes (#9810)
* Make sure errors are always displayed when watching for changes

* Update changelog
2022-11-11 10:14:14 -05:00
Jordan Pittman
1482c7512a
Fix watching of files on Linux when renames are involved (#9796)
* Fix watching files on Linux

* Update changelog
2022-11-10 12:33:42 -05:00
Ankan Bag
8a2f9ed0d1
Fix !important selectors not being classified as valid class inside safelist config (#9791)
* fix !imp selector not safelisted as valid class

* add tests for !imp selectors in safelist config

* add test to check for invalid variants

* Only check important utilities for patterns that include a `!`

* Update changelog

Co-authored-by: Jordan Pittman <jordan@cryptica.me>
2022-11-09 16:58:12 -05:00
Jordan Pittman
6bd991201f
Only sort pseudo elements after classes when using @apply and variants (#9765)
* Sort pseudo elements ONLY after classes

* Update changelog
2022-11-09 16:41:16 -05:00
Jordan Pittman
aac468c1fb
Pick up changes from files that are both context and content deps (#9787)
* Pick up changes from files that are both context and content deps

We switched to absolute paths and it broke this revealing a lurking bug. Fun.

* Update changelog

* Update changelog
2022-11-09 10:22:25 -05:00
Will Cosgrove
1f5d117cf9
Fix shadowed variable when using raw content (#9773)
* Fix shadowed variable when using raw content

* Add test

* Update changelog

Co-authored-by: Jordan Pittman <jordan@cryptica.me>
2022-11-08 17:02:10 -05:00
Robin Malfait
aa979d645f
ensure we fallback to '' for backwards compatibility reasons 2022-11-03 17:21:27 +01:00
Konstantin Lapeev
bf28bf61c1
Fix cannot read properties of undefined (reading 'modifier') (#9656)
* fix #9655

* update changelog

* add test for making sure calling variantFn doesn't crash

* make it behave as-if modifiers didn't exist

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2022-11-03 15:10:45 +01:00
Imran Khan
0a4ae7730d
Fix not rebuilding files when rename event is emit (#9689)
* Fix CLI not rebuilding files when `rename` event is emit

* Refactor watching code

* Simplify

* Add rebuild timer

* Move timer into `recordChangedFile`

Co-authored-by: Jordan Pittman <jordan@cryptica.me>
2022-11-03 09:00:38 -04:00
Robin Malfait
d33b6503ea
Fix incorrect selectors when using @apply in selectors with combinators and pseudos (#9722)
* sort tags, classes and pseudos per group (separated by combinators)

* use default behaviour of sort

* update changelog
2022-11-03 12:20:38 +01:00
Ankan Bag
c10ba4e9ba
Fix fractional values not being parsed properly inside arbitrary properties (#9705)
* remove redundant closing bracket in regex pattern

* test fractional spacing values in theme function

* add test that ensures arbitrary properties are separate

* update changelog

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2022-11-03 11:10:33 +01:00
Brad Cornes
7ec9dc311b
Ensure configured font-feature-settings are included in Preflight (#9707)
* Add `font-feature-settings` to `html` in preflight

* Update source map test snapshots

* Update changelog
2022-11-01 17:52:59 +00:00
Brad Cornes
e231ea6c61
Fix merging of arrays during config resolution (#9706)
* Fix merging of arrays during config resolution

* Update changelog
2022-11-01 16:29:47 +00:00
Connor Pearson
661f58ce8b
Exclude non-relevant selectors when generating rules with the important modifier. Fixes #9677. (#9704) 2022-11-01 09:06:03 -04:00
Khoo Hao Yit
0bdd19aae0
Fix nested style have redundant CSS (#9644)
* Fix nested style have redundant `CSS`

* wip

* Update changelog

Co-authored-by: Jordan Pittman <jordan@cryptica.me>
2022-10-24 11:44:32 -04:00
Jordan Pittman
e63c111c03
Escape special characters in resolved content base path (#9650)
* Refactor

* Escape special characters in the content pattern base path

* Update changelog
2022-10-24 08:06:39 -04:00
Robin Malfait
0bbca33a85
ensure we also check wether the modifier exists in the modifiers object
Before we were just checking if the `modifiers` option is `any` or an
object, without actually checking that in case it is an object, the
value actually existed.
2022-10-21 18:11:48 +02:00
Robin Malfait
40f6b4ff64
Fix missing PostCSS dependencies in the CLI (#9617)
* Record and watch PostCSS dependencies in the CLI

* ensure `changedContent` gets cleared

Otherwise this list gets bigger and bigger, not only that there is a
subtle bug. The moment you save a `.css` file we want to create a new
context and start from scratch. However, since the list was never
cleared, it meant that every subsequent save to *any* file (not only
config / css files) creates a new context...

By clearing the least we should work around this problem.

* add test that verifies an odd bug

The story goes like this:

1. add `underline` to html file
  -> css contains `underline` rule
2. add `font-bold` to html file
  -> css contains `underline` and `font-bold`
3. remove `underline` from html file
  -> css still contains `underline` and `font-bold` for performance reasons
4. Save a css file (! RED FLAG)
  -> css contains `font-bold` because we started from scratch
5. add `underline` to html file
  -> css contains `underline` and `font-bold`
6. remove `underline` from html file
  -> css only contains `font-bold`... (UH OH)

This is because the moment we did step 4, every single save in any file created a new context. Every. Single. Time.

* use a property that doesn't require `autoprefixer`

* update changelog

Co-authored-by: Jordan Pittman <jordan@cryptica.me>
2022-10-20 18:01:39 +02:00
Robin Malfait
7f736084d2
Improve warning messages (#9608)
* drop experimental log

* reword some warning messages
2022-10-19 18:35:42 +02:00
Robin Malfait
ddb9b4d7bc
ensure DEFAULT is taken into account for matchVariant (#9603)
This means that if you define your `matchVariant` as:

```js
matchVariant('foo', (value) => '.foo-${value} &')
```

Then you can't use `foo:underline`, if you want to be able to use
`foo:underline` then you have to define a `DEFAULT` value:

```js
matchVariant('foo', (value) => '.foo-${value} &', {
  values: {
    DEFAULT: 'bar'
  }
})
```

Now `foo:underline` will generate `.foo-bar &` as a selector!
2022-10-18 21:42:17 +02:00
Robin Malfait
b67f52cd57
Increase strictness when using applyVariant on illegale candidates (#9599)
* ensure that cases like `@-[200px]` and `group[:hover]` aren't allowed

* update changelog
2022-10-18 12:03:41 +02:00
Robin Malfait
59395097ed
expose hasDash for the intellisense plugin (#9594) 2022-10-17 17:13:33 +02:00