4133 Commits

Author SHA1 Message Date
Michael
f332bee41b
Update color warnings to match other warnings (#5412)
* Update color warnings to match other warnings

Make the color deprecation warnings match the style of other warnings in tailwind

* Fix formatting

* Use log helper

Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
2021-09-10 14:41:19 -04:00
Adam Wathan
7859cee257 Update changelog 2021-09-10 09:52:16 -04:00
Adam Wathan
b0cf6eded3
Support using functions as colors when disabling color opacity utilities (#5470) 2021-09-10 09:35:15 -04:00
Robin Malfait
50b766dd47
Remove variants related code (#5465)
* drop `variants` related resolveConfig functionality

More AOT code that we could get rid of!

* drop more files!

I keep finding these unused files 😅

* Update setupContextUtils.js

Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
2021-09-10 09:34:27 -04:00
Robin Malfait
30badadd21
ensure that we fallback to the first argument without any flags (#5464) 2021-09-10 10:14:44 +02:00
depfu[bot]
e36d242c8d Update @babel/core to version 7.15.5 2021-09-09 21:58:43 +00:00
Robin Malfait
9daebe43b9
Replace underscore with space in arbitrary values (#5460)
* refactor dropShadow plugin, use `matchUtilities`

* replace `_` with ` ` for arbitrary values

* remove custom `asList` function

* do not replace escaped underscores with spaces
2021-09-09 18:10:04 +02:00
Brad Cornes
4919cbfbb8
Update color parsing and formatting (#5442)
* Replace `culori` with simple color parser

* Use space-separated color syntax

* Update default color values to use space-separated syntax

* Update separator regex

* Fix tests

* add tests for the new `color` util

Also slightly modified the `color` util itself to take `transparent`
into account and also format every value as a string for consistency.

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2021-09-09 16:15:53 +02:00
Jonathan Reinink
12fa78b9ca
Add column utilities (#5457)
Co-Authored-By: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
Co-Authored-By: Cody <codytooker@gmail.com>
2021-09-09 09:29:44 -04:00
Robin Malfait
688357fdde
Inline plugins (#5455)
* filter out `..Variant` plugins for the core-plugin-list

* inline all corePlugins

* move preflight css to `./src/css`

* remove individual plugins

* convert export default object to named exports

Note: Normally I would use export function ..., but since we also have
some export let xx = createUtilityPlugin in this file, it means that all
the `export function` declarations would be hoisted and therefore won't
have the correct order anymore.

To fix this, I used `export let xx = () => {}` instead of the usual
`export function xx() {}`

* drop unused `variants()` function

This was required for AOT mode.

* make a few plugins shorter
2021-09-09 09:22:50 -04:00
Adam Wathan
00025020f7 Update changelog 2021-09-09 08:37:08 -04:00
Robin Malfait
249f6ff596
drop unused files (#5453) 2021-09-09 08:39:14 +02:00
Jonathan Reinink
ec0562b887 Add text-indent update to changelog
Co-Authored-By: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
2021-09-08 15:17:30 -04:00
Jonathan Reinink
1c10cf261b
Add text-indent utilities (#5449)
Co-Authored-By: Adam Wathan <4323180+adamwathan@users.noreply.github.com>

Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
2021-09-08 15:16:46 -04:00
Jonathan Reinink
60414f4799 Add will-change update to changelog 2021-09-08 14:51:30 -04:00
Jonathan Reinink
b04dab6be6
Add will-change utilities (#5448)
Co-Authored-By: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
2021-09-08 14:50:31 -04:00
Robin Malfait
eb3fe8fe27
ensure that divide utilities inject a default border color (#5438) 2021-09-08 11:39:32 +02:00
Adam Wathan
a5425abd86 Support any arbitrary value for accentColor 2021-09-07 21:12:57 -04:00
Luke Warlow
51f71af62c
Add accent-color utilities (#5387)
* Add accent-color utilities

* Address comments
2021-09-07 21:07:54 -04:00
depfu[bot]
9371cce670
Update eslint-plugin-prettier to version 4.0.0 (#5409)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2021-09-07 21:04:48 -04:00
Robin Malfait
f99302c626
Support @apply for classes outside of a @layer (#5378)
* support `@apply` for classes outside of a `@layer`

* Add failing test for respecting source order

* sort rules when using `@apply`

The `layer` was not taken into account yet when we resolved the rules
from the applyCache. This is because we set the `classCache` to the
`matches` inside of the `generateRules` function. You can think of them
as "raw" rules I guess. However, it is later in that function that we
apply the `layerOrder` to the `sort`.

This does mean that when you `@apply font-bold text-red-500` that the
rules inside the `.target {}` will be in order of the "normal" css as
well.

Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
2021-09-07 21:03:46 -04:00
Robin Malfait
4142b3fbaf
setup npm registry url
The `NPM_TOKEN` name was also incorrect (surprise?). Found another
resource here that mentions the `registry-url` option and
`NODE_AUTH_TOKEN`. Let's see if that works...

https://docs.github.com/en/actions/guides/publishing-nodejs-packages
2021-09-07 15:58:32 +02:00
Robin Malfait
fac02f3de9
use the correct token name
I used `NODE_AUTH_TOKEN` in other projects but that doesn't seem to work
anymore for some reason 🤔

Found this resource that talks about `NPM_TOKEN`: https://docs.npmjs.com/using-private-packages-in-a-ci-cd-workflow
2021-09-07 15:52:17 +02:00
Robin Malfait
4a70091262
trigger new release 2021-09-07 15:40:19 +02:00
Robin Malfait
016eaa5091
Add --no-git-tag-version flag (#5426)
When you run `npm version`, it also tries to make a git commit and a git
tag. However, we are not doing anything with this and CI doesn't know
who the committer is.
2021-09-07 14:45:03 +02:00
Robin Malfait
2b9c4fec1f
Force creating an npm version for insiders build (#5423)
This fails because we usually use node 14 or 16, which has a
package-lock.json version of `2`. However on node 12, this version is
`1`. This means that after an npm install the package-lock.json is
touched and thus `npm version` fails because git is in a dirty
directory.

Adding a `--force` is not ideal, but also not really an issue since the
only thing that could change is the package-lock.json and this is not
published to npm anyways.
2021-09-07 14:30:55 +02:00
Robin Malfait
d01091d44d
Improve release workflows part 2 (#5422)
* ensure we build before the tests

Our tests require that for now. Will probably improve this in the
future.

* improve insiders version name

This will make it consistent with previously published versions.
2021-09-07 14:18:22 +02:00
Robin Malfait
7c9bc49259
Add automated release/npm publish workflows (#5421) 2021-09-07 14:13:21 +02:00
Adam Wathan
a51aab9111 Changelog formatting 2021-09-06 15:35:25 -04:00
Adam Wathan
5b03d35cb4 Update changelog 2021-09-06 15:33:07 -04:00
Adam Wathan
4d9ff4c884 Merge branch 'update-changelog' 2021-09-06 15:07:36 -04:00
Adam Wathan
d995d5ef61 Update changelog 2021-09-06 15:07:23 -04:00
Adam Wathan
db8b449a67
Enable extended color palette (#5384)
Co-Authored-By: Adam Wathan <4323180+adamwathan@users.noreply.github.com>

Co-authored-by: Jonathan Reinink <jonathan@reinink.ca>
Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
2021-09-06 14:29:03 -04:00
Robin Malfait
920f21264c
Simplify negate value (#5389)
* simplify `negateValue`

Co-authored-by: Brad Cornes <bradlc41@gmail.com>

* ensure we have the exact same behaviour

* Simplify/loosen regex to be more future-proof

Co-authored-by: Brad Cornes <bradlc41@gmail.com>
Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
2021-09-06 14:26:32 -04:00
Brad Cornes
f86c16b1ed
Update package files config (#5405) 2021-09-06 14:26:24 -04:00
Robin Malfait
a34bd62bb6
Remove lodash (#5390)
* remove `lodash` usage

* implement custom cloneDeep to replace lodash's

* drop lodash in processPlugins

* add `toPath` utility

* add `tap` utility

* add `cloneDeep` utility

* drop lodash in evaluateTailwindFunctions

* add `defaults` utility

* drop lodash from `resolveConfig`

* remove `lodash` dependency
2021-09-06 14:15:10 -04:00
Adam Wathan
a9e160cf9a Reintroduce universal selector optimization behind experimental flag 2021-09-06 13:58:02 -04:00
Robin Malfait
2dac5bb569
Add custom plugins tests (#5383)
* add tests for the plugin API

* make plugin invocation optional

It could be that an object has been passed as a plugin, in that case we
will use the `handler` function from the object. If it doesn't exist,
then we will only take the `config` section out of it.
2021-09-04 16:33:55 +02:00
Robin Malfait
c315db5f15
port @layer tests from AOT to JIT mode (#5379) 2021-09-03 17:46:15 +02:00
Jonathan Reinink
4f89215d88
Unify config helpers into single object (#5382)
Co-Authored-By: Adam Wathan <4323180+adamwathan@users.noreply.github.com>

Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
2021-09-03 10:31:19 -04:00
Robin Malfait
e37931ba65
JIT by default - move tests and make them consistent (#5374)
* move `./tests/jit` to `./tests`

* make tests consistent

Abstracted a `run` function and some syntax highlighting helpers for
`html`, `css` and `javascript`.
2021-09-03 13:48:16 +02:00
depfu[bot]
776a5aea31 Update all of jest to version 27.1.0 2021-09-03 10:18:18 +00:00
depfu[bot]
a382cde7c5 Update jest-diff to version 27.1.0 2021-09-03 10:13:39 +00:00
Jonathan Reinink
e9cde3a070
Add native aspect ratio support (#5359) 2021-09-02 08:32:02 -04:00
Jonathan Reinink
154d99054b
Inline modern-normalize, consolidate with preflight (#5358) 2021-09-01 14:54:25 -04:00
Robin Malfait
7852d4f12f
Throw an error when applying the .group utility (#4666) 2021-09-01 18:08:35 +02:00
Dr. Derek Austin
36a02edf11
Remove duplicate prettier.config.js settings from .eslintrc.json (#5087)
* chore: remove duplicate prettier.config.js settings from .eslintrc.json

* chore: remove unnecessary brackets now that "prettier/prettier" rule is no longer an array -- this a purely cosmetic change
2021-09-01 17:41:43 +02:00
Robin Malfait
d5c87f9632
Merge branch 'hsl-spaces' 2021-09-01 17:29:52 +02:00
Hunter Tunnicliff
be4aa931b6
Fix handling of CSS variable declarations 2021-09-01 17:28:30 +02:00
Hunter Tunnicliff
721e57312b
Fix formatting 2021-09-01 17:28:30 +02:00