4671 Commits

Author SHA1 Message Date
Robin Malfait
c01ce5c0fd
3.1.0 v3.1.0 2022-06-08 15:32:47 +02:00
Robin Malfait
66c7a199d4
update changelog 2022-06-08 15:32:47 +02:00
Robin Malfait
a0c2ee8c38
Ensure we can use @import 'tailwindcss/...' without node_modules (#8537)
* ensure we can use `@import 'tailwindcss/...'` without node_modules

This is useful if you are using `npx tailwindcs ...` and to prevent
that postcss-import crashes on the tailwind specific imports which we
will replace anyway.

* update changelog
2022-06-07 19:03:38 +02:00
Ivo Sabev
ac91c6aaae
Remove process dependency from log functions (#8530)
* Remove process dependency from log functions

* Fix check

* update changelog

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2022-06-07 11:23:32 +02:00
Adam Wathan
4f400767a8
Add ::backdrop to universal defaults (#8526)
* Add `::backdrop` to universal defaults

* Update changelog
2022-06-06 15:53:08 -04:00
Jordan Pittman
14f6574318
Only listen for stdin close on TTYs (#8523) 2022-06-06 10:04:18 -04:00
depfu[bot]
436b543d70 Update eslint to version 8.16.0 2022-06-03 21:44:53 +00:00
depfu[bot]
75dac6825b Update detective to version 5.2.1 2022-06-03 16:28:25 +00:00
Robin Malfait
4a745439f0
Add type annotations to the tailwind.config.js file (#8493)
* add type annotation to the config by default

* use `@type {import('tailwindcss').Config}` instead
2022-06-02 16:44:12 +02:00
Jordan Pittman
64b4e6df7b
Replace rgb and hsl helpers with <alpha-value> placeholder for colors with custom properties (#8501)
* implement <alpha-value>

* remove `rgb`/`hsl` helpers, use `<alpha-value>` instead

* never pass undefined to `withAlphaValue`

* WIP

* WIP

* WIP

* WIP

* Update changelog

* Cleanup

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2022-06-02 10:21:20 -04:00
depfu[bot]
1f74568352 Update @swc/core to version 1.2.196 2022-06-01 21:28:44 +00:00
Adam Wathan
c65a1a2a79
Don't inherit gradient "to" from parent (#8489)
* Don't inherit gradient "to" from parent

* Update changelog
2022-06-01 15:25:45 -04:00
Adam Wathan
fca70850b2
Add optional variant (#8486)
* Add  variant

* Update changelog
2022-06-01 08:39:43 -04:00
Adam Wathan
1bde724d14 Move items in changelog 2022-06-01 06:20:19 -04:00
Adam Wathan
2b944c5b10 Skip tests ending in .test.skip.js 2022-06-01 06:16:39 -04:00
Adam Wathan
5398d57b1a Update changelog 2022-06-01 06:02:59 -04:00
Adam Wathan
a11e0c63be Disable variantGrouping experiment 2022-06-01 06:02:15 -04:00
Jordan Pittman
0744954802 Update changelog 2022-05-31 13:16:36 -04:00
Jordan Pittman
34fd0fb82a Feature flag matchVariant API 2022-05-31 13:15:14 -04:00
Robin Malfait
d2fdf9eb09
Allow returning parallel variants from addVariant or matchVariant callback functions (#8455)
* allow to return an array of format strings from matchVariant or
addVariant

* add parallel variant with function test

* upgrade test to use a function call

* allow to return parallel variants from variant function

Caveat: this now belongs to the same plugin and is not registered as
separate variants which means that sort order can differ.

* prevent crash if `.toMatchFormattedCss()` receives undefined

* update changelog

* ensure that we use a local list of variant functions

Now that a variant function can return a list of variant functions from
within the plugin, we have to make sure to executed and register those
functions as well.

However, we need to make sure that this list is local for the variant
and not "globally" registered otherwise we keep add a dynamic function
to the global list which results in duplicate output becaus multiple
duplicate variants will be registered.

* add little warning regarding potential clashes

* Update CHANGELOG.md
2022-05-31 15:03:06 +02:00
Adam Wathan
2dffc87447 Move stuff in changelog 2022-05-30 16:18:05 -04:00
depfu[bot]
62e3514233 Update postcss to version 8.4.14 2022-05-28 16:49:42 +00:00
Jordan Pittman
ac8fbc680e Update changelog 2022-05-27 10:02:03 -04:00
Jordan Pittman
3f4005e833 Disable filterDefault for ring opacity when using respectDefaultRingColorOpacity 2022-05-27 09:59:52 -04:00
Jordan Pittman
cab1fcecc5
Add future flag to preserve custom, default ring color opacity (#8448)
* Add future flag to preserve ring color opacity

* Update changelog
2022-05-27 09:48:27 -04:00
depfu[bot]
029540893d Update jest to version 28.1.0 2022-05-27 12:30:06 +00:00
Jordan Pittman
c4e443acc0
Add postcss-import support to the CLI (#8437)
* Add postcss-import support to the CLI

* Update changelog
2022-05-25 14:28:52 -04:00
Jordan Pittman
50bed74cdc
Support alpha values for theme() function (#8416)
* Fix typo

* Support alpha modifier for theme color values

* Eliminate redundant object creation in resolveFunctionKeys

Building an object of N keys incrementally using Object.reduce + splat results in N intermediate objects. We should just create one object and assign each key.

* Switch to inline theme values in theme fn in config

* Add test case

And fix typos that were definitely not there

* Update changelog
2022-05-25 13:54:30 -04:00
Brad Cornes
22f9dc8895
Use single-line syntax for private types comments (#8420)
This prevents the comments from appearing in editors
2022-05-25 10:49:20 +01:00
depfu[bot]
33dff03743 Update jest-diff to version 28.1.0 2022-05-25 07:58:17 +00:00
Brad Cornes
c3cf064ae5
Improve theme.extend types (#8419) 2022-05-24 13:26:26 +01:00
depfu[bot]
c8cca0c608 Update cssnano to version 5.1.9 2022-05-23 21:58:08 +00:00
Jordan Pittman
50024e4603 Fix grouping using different variant types inside nested groups 2022-05-23 15:43:12 -04:00
Jordan Pittman
b0e1f47b94 Be more direct about variant group extractions
Also adds a previously failing but now passing test case
2022-05-23 15:29:29 -04:00
depfu[bot]
770900b77d Update prettier-plugin-tailwindcss to version 0.1.11 2022-05-23 17:43:31 +00:00
Robin Malfait
68ff4ba500
Experimental support for variant grouping (#8405)
* WIP

* use correct separator

* run all tests

* Fix regex

* add a few more tests

* name the experimental feature flag `variantGrouping`

* update changelog

* rename test file `variant-grouping`

Co-authored-by: Jordan Pittman <jordan@cryptica.me>
2022-05-23 17:45:23 +02:00
Robin Malfait
816a0f26c9
Add prefers-contrast media query variants (#8410)
* Add prefers-contrast variants

* add tests for prefers contrast

* dark mode should have precedence over prefers contrast variants

* update changelog

Co-authored-by: Luke Warlow <projects@warlow.dev>
2022-05-23 17:40:14 +02:00
Robin Malfait
83b4811c60
Improve types of the tailwindcss/plugin (#8400)
* improve types of the `tailwindcss/plugin`

This also exposes/types the `plugin.withOptions` as described here: https://tailwindcss.com/docs/plugins#exposing-options

* update changelog
2022-05-23 12:35:19 +02:00
depfu[bot]
81641859cd Update autoprefixer to version 10.4.7 2022-05-21 21:58:47 +00:00
Adam Wathan
128030fcfa
Only apply hover styles when supported (future) (#8394)
* Only apply hover styles when supported (future)

Co-Authored-By: Andrew Brown <browner12@gmail.com>

* update changelog

Co-authored-by: Andrew Brown <browner12@gmail.com>
Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2022-05-20 11:20:20 -04:00
Adam Wathan
bb4f5dab6b
Fix matchVariants that use at-rules and placeholders (#8392)
* Fix matchVariants that use at-rules and placeholders

* update changelog

* Update CHANGELOG.md

* Only parseVariant when result is defined

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2022-05-20 10:33:36 -04:00
Adam Wathan
1a564fa7e2 Co-locate addVariant and matchVariant 2022-05-20 10:12:58 -04:00
depfu[bot]
23d3a316f5 Update esbuild to version 0.14.39 2022-05-19 22:44:29 +00:00
Jordan Pittman
30538b363f
Update integration tests (#8386)
* Add content glob integration tests

* Use tagged version in parcel integration tests

* Upgrade postcss-cli integration tests

* upgrade integration test deps

* Fix CS

* Fix tests

* Update lockfile

* Fix vite test in CI
2022-05-19 16:44:20 -04:00
Robin Malfait
fc25299aa6
Add matchVariant API (#8310)
* update regex extractor

* implement `matchVariant` API

* add `matchVariant` test

* add `values` option to the `matchVariant` API

* move `matchVariant` tests to own file

* update changelog
2022-05-17 18:08:42 +02:00
Jordan Pittman
6c63f67d20
Create tailwind.config.cjs file in ESM package when running init (#8363)
* refactor

* Adds support for tailwind.config.cjs files to CLI

* Update changelog

Co-authored-by: Nate Moore <nate@natemoo.re>
2022-05-16 10:53:03 -04:00
Jordan Pittman
0313f02e2c
Move some config error checking out of resolveConfig (#8362) 2022-05-16 10:10:40 -04:00
depfu[bot]
638c8f43ea Update @swc/jest to version 0.2.21 2022-05-15 05:12:55 +00:00
Adam Wathan
177a00b156 Update changelog 2022-05-14 14:06:24 -04:00
Adam Wathan
7fa2a200b2
Reject invalid custom and arbitrary variants (#8345)
* WIP

Still need to write error message

* Update error message

first pass at something better

* Detect invalid variant formats returned by functions

* Add proper error message

Co-authored-by: Jordan Pittman <jordan@cryptica.me>
2022-05-14 13:58:02 -04:00