35 Commits

Author SHA1 Message Date
Adam Wathan
cb48248552 Remove existing CLI 2021-06-04 11:44:28 -04:00
Adam Wathan
b9dd8b0a6d
Add peer variant (#4556) 2021-06-04 10:32:49 -04:00
Adam Wathan
65fde59f6a
Make it possible to enable caretColor and content core plugins in AOT mode (#4548)
* Fix issue where disabled corePlugins can't be re-enabled

* Disable caretColor and content core plugins by default, enable in JIT

* Don't disable caretColor/content in default config stub, hard-code for AOT instead

But with ability to still opt-in through your own config. Somewhat messy, but goal is to keep the messes in the AOT path and keep the JIT path pure.

* Fix style

* Revert unnecessary changes

* Fix style
2021-06-03 15:27:22 +02:00
Robin Malfait
d6b11b3807
Group variant stacking (#4551)
* make group variant stacking work

* simplify stacking group variants
2021-06-03 15:25:46 +02:00
Adam Wathan
7264a5b71b
Generate group parent classes correctly with custom separator (#4508) 2021-05-30 15:02:55 -04:00
Adam Wathan
15642fbcc8 Compare adjacent rules ignoring whitespace 2021-05-30 14:55:30 -04:00
Adam Wathan
77dfac2bfa
JIT: Add caret-color utilities (#4499)
Co-Authored-By: Jesse Katsumata <niconico.clarinet@gmail.com>

Co-authored-by: Jesse Katsumata <niconico.clarinet@gmail.com>
2021-05-28 13:55:42 -04:00
Adam Wathan
d1e9632064
JIT: Add exhaustive pseudo-class and pseudo-element variant support (#4482)
* Add first-line, first-letter, and marker variants

* Add selection variant

Co-Authored-By: Eric Rodrigues Pires <eric@eric.dev.br>

* Add remaining pseudo-class variants

* Add target pseudo-class

Co-Authored-By: Peter Neupauer <peter@neupauer.sk>

* add test for parallel variants

* implement parallel variants

Co-authored-by: Eric Rodrigues Pires <eric@eric.dev.br>
Co-authored-by: Peter Neupauer <peter@neupauer.sk>
Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2021-05-27 17:09:29 +02:00
Brad Cornes
6bf6738683 Add transform and extract APIs (#4469)
* add `transform` and `extract` APIs

* make svelte transform part of the transformer stuff
2021-05-26 09:43:05 -04:00
Adam Wathan
1849e35f14 Refactor internals to decouple watch strategies and extract IO
Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2021-05-26 09:43:05 -04:00
Adam Wathan
c8a5f816f4
JIT: Add support for before/after pseudo-elements (#4461) 2021-05-26 08:57:02 -04:00
Adam Wathan
a2c44907ba Rebuild fixtures 2021-05-24 11:50:06 -04:00
Adam Wathan
5fa665835f Fix formatting issues 2021-05-20 13:43:17 -04:00
Adam Wathan
d8bd507b9b
JIT: Add per-side border colors (#4404) 2021-05-20 13:35:39 -04:00
Adam Wathan
23da6b6172
JIT: Replace @tailwind screens with @tailwind variants (#4356)
* Update CHANGELOG

* JIT: Replace `@tailwind screens` with `@tailwind variants`
2021-05-14 13:58:52 -04:00
Adam Wathan
87df93de0a
Support opacity modifiers for colors in JIT (#4348)
* Support opacity modifiers for colors in JIT

* Add test for function colors

* Support opacity modifiers for plugins with arbitrary "any" type
2021-05-14 13:07:56 -04:00
Adam Wathan
30dc2990c3
Error when @layer used without matching @tailwind directive (#4335)
Also refactor to only detect `@tailwind` directives once per build to improve performance.
2021-05-12 16:58:03 -04:00
Adam Wathan
6d51f9a08a Add read-only variant to JIT 2021-05-11 15:36:18 -04:00
Mateusz
f89bf5f4a6
Add :read-only variant (#4102)
* Add :read-only variant

* Added read-only variant to defaultConfig.stub

Co-authored-by: FunnyScarf <5177092+dyzajash@users.noreply.github.com>
2021-05-11 15:29:23 -04:00
Adam Wathan
7991646eff
Add screen function (#4318) 2021-05-11 15:25:25 -04:00
Adam Wathan
5ebe5e8309
Remove dependency on postcss-functions (#4317)
* Write postcss-functions ourselves

* Add test for nested theme calls

* Remove unused import
2021-05-11 14:33:05 -04:00
Adam Wathan
522787ac41 Revert fix lint errors?! 2021-05-11 14:25:34 -04:00
Adam Wathan
9fc13a6564 Fix lint errors 2021-05-11 13:55:02 -04:00
Adam Wathan
c1f93135b8 Update fixtures for modern-normalize v1.1 2021-05-11 13:47:32 -04:00
Adam Wathan
4bfa21f756
Support border-opacity with default border color (#4277)
* Move border reset to borderColor plugin, support opacity

* Update JIT tests

* Don't use opacity variable for default border color when borderOpacity is disabled

* Fix tests
2021-05-08 06:59:14 -04:00
Adam Wathan
a22398cbdb Add empty variant support to JIT 2021-05-07 14:48:41 -04:00
Brad Cornes
6a7d156608 Resolve purge paths (#4214)
* resolve purge paths

* add test for purgecss pattern resolution

* resolve purgecss patterns relative to the config file if there is one

* account for raw content when transforming purgecss options

* append test name to postcss `from` option in purge tests
fixes tests hanging

* add test for relative purge path resolution in JIT mode
2021-05-07 13:56:16 -04:00
Adam Wathan
dec1fc3df3 Support forcing coercion type with arbitrary value syntax (#4263)
* Support forcing coercion type with arbitrary value syntax

* Refactor + more tests
2021-05-07 13:56:16 -04:00
Brad Cornes
73fe57aea9 [JIT] Add support for "raw" purge content (#4272)
* add support for "raw" purge content

* add support for raw content extensions
2021-05-07 13:56:16 -04:00
Adam Wathan
114baeeef1 Support applying important utilities in JIT (#4260) 2021-05-07 13:56:16 -04:00
Robin Malfait
c7bcfe52cd simplify animation tests and improve stability (#4250)
This will make sure that we tackle a few additional edge cases:

- When the `name` is the same as a reserved keyword, then it will be
  used as a `name` as well. E.g.: 1s ease ease infinite; Will result in
  a name of `ease` as well.
- We take care of trimming and multiple spaces.
- We don't generate 8k tests anymore, which means that these specific
  tests only take a second instead of 10 seconds.
2021-05-07 13:56:15 -04:00
Robin Malfait
0c5c5409d7 Improve matchUtilities API and make it work with the AOT engine (#4232)
* implement matchUtilities2

* ensure animation names without keyframes are not prefixed

* remove matchBase

* call addUtilities for each group individually

* WIP: Write plugins using matchUtilities2

* MORE

* Fix arbitrary value support for fontSize

* Fixes, update fixtures

* Rebuild fixtures

* Don't generate `divide` class with no modifier

* Fixes, rebuild fixtures

* Rename matchUtilities2 to matchUtilities

* Delete bad tests

* Remove temp files GROSS

* Clean stuff up

* Support no return in matchUtilities

Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
2021-05-07 13:56:15 -04:00
Adam Wathan
cc4d1d2658 Refactor fontVariantNumeric to remove mode condition 2021-05-07 13:56:15 -04:00
Adam Wathan
cd2db712c5 Very basic AOT matchUtilities support 2021-05-07 13:56:15 -04:00
Robin Malfait
d497777202 [WIP] Unify JIT and AOT code paths (#4188)
* WIP

* WIP

* Finish combining JIT and AOT plugins

Still lots of clean up that can be done in some of the more complex ones, but at least it's one file per plugin now.

* Remove unused import

* Fix AOT generation bugs

* Move corePlugins/index.js to corePlugins.js

* Convert JIT files to ESM

* Move tests

* Reorder core plugins to match JIT order

* Update AOT apply tests

* Unify utils

* Combine plugin lists to one single source of truth

* Finish resolving merge conflicts, fix tests

Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
2021-05-07 13:56:15 -04:00