4525 Commits

Author SHA1 Message Date
Jordan Pittman
bd167635d5
Invalidate context when main css changes (#7626)
* Invalidate context when CSS changes

* Remove invalidation count check

* Add sass integration test

* Update changelog
2022-02-25 13:12:45 -05:00
Adam Wathan
d9bc25da6a Inline test resources 2022-02-25 13:00:57 -05:00
depfu[bot]
d3e754adb4
Update object-hash to version 3.0.0 (#7657)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2022-02-25 12:17:16 -05:00
Adam Wathan
7a24b3f320
Update CHANGELOG.md 2022-02-25 10:18:49 -05:00
Jordan Pittman
910b655388
Use local user css cache for apply (#7524)
* Fix context reuse test

* Don't update files with at-apply when content changes

* Prevent at-apply directives from creating new contexts

* Rework apply to use local postcss root

We were storing user CSS in the context so we could use it with apply. The problem is that this CSS does not get updated on save unless it has a tailwind directive in it resulting in stale apply caches. This could result in either stale generation or errors about missing classes.

* Don’t build local cache unless `@apply` is used

* Update changelog
2022-02-25 08:35:22 -05:00
Brad Cornes
f84ee8be21 Update changelog 2022-02-24 16:41:35 +00:00
Bogdan Chadkin
2dec5649c9
Replace chalk with picocolors (#6039)
* Replace chalk with picocolors

Already used in latest postcss, autoprefixer and browserslist versions.

See https://github.com/alexeyraspopov/picocolors

* Update `dim` function

Co-authored-by: Brad Cornes <bradlc41@gmail.com>
2022-02-24 16:37:31 +00:00
Jordan Pittman
04686b8a05
Split box shadows on top-level commas only (#7479)
* Split box shadows on top-level commas only

* Update changelog
2022-02-23 11:31:55 -05:00
Jordan Pittman
b94d565eb6
Preserve source maps for generated CSS (#7588)
* Preserve source maps for `@apply`

* Overwrite the source for all cloned descendants

* Preserve source maps when expanding defaults

* Verify that source maps are correctly generated

* Update changelog
2022-02-23 11:24:54 -05:00
Jordan Pittman
d72b277ba6
Allow default ring color to be a function (#7587)
* Allow default ring color to be a function

* Update changelog
2022-02-22 16:51:04 -05:00
Jordan Pittman
3b8ca9d4eb
Recursively collapse adjacent rules (#7565)
* Recursively collapse adjacent rules

* Update changelog
2022-02-21 12:58:12 -05:00
Jordan Pittman
af64d7190c
Prevent nesting plugin from breaking other plugins (#7563)
* Prevent nesting plugin from breaking other plugins

This uses a private API but it’s the only solution we have right now. It’s guarded to hopefully be less breaking if the API disappears.

* Update changelog
2022-02-21 10:12:39 -05:00
depfu[bot]
9effea5d28 Update cssnano to version 5.0.17 2022-02-20 14:44:29 +00:00
depfu[bot]
23b1b301a1 Update postcss-load-config to version 3.1.3 2022-02-17 14:58:42 +00:00
Robin Malfait
93e0fdf29f
3.0.23 v3.0.23 2022-02-16 12:20:14 +01:00
Robin Malfait
67b28601b3
update changelog 2022-02-16 12:20:14 +01:00
Robin Malfait
63537aaa89
Implement getClassOrder instead of sortClassList (#7459)
* implement `getSortOrder` instead of `sortClassList`

* rename `getSortOrder` to `getClassOrder`

* update changelog
2022-02-16 11:03:00 +01:00
Jordan Pittman
be5d5c9e66
Fix wildcard duplication issue (#7478)
This would be better as a symbol but the stringy-ness of class candidates is fairly well baked into assumptions across the codebase. Using `new String` with a well placed check seems to solve the problem.
2022-02-15 13:44:19 -05:00
Jordan Pittman
db475be6dd
Support arbitrary values + calc + theme with quotes (#7462)
* Support arbitrary values + calc + theme with quotes

* Update changelog
2022-02-14 15:44:27 -05:00
Jordan Pittman
f116f9f664
Remove opacity variables from :visited pseudo class (#7458)
* Support functions in pseudo variant list

* Remove text/border/bg color from :visited

* Update changelog
2022-02-14 13:24:18 -05:00
depfu[bot]
09d151f3f9 Update esbuild to version 0.14.21 2022-02-14 17:43:53 +00:00
depfu[bot]
0c5af6fed4 Update jest to version 27.5.1 2022-02-12 10:25:12 +00:00
depfu[bot]
c13afd38aa Update jest-diff to version 27.5.1 2022-02-12 10:15:18 +00:00
Jordan Pittman
b26ffa0581 3.0.22 v3.0.22 2022-02-11 10:32:30 -05:00
Jordan Pittman
752f54cc37 update changelog 2022-02-11 10:32:30 -05:00
Jordan Pittman
23661cfef0
Temporarily move postcss to dependencies (#7424)
* Temporarily move postcss to dependencies

This is unfortunate but upgrading postcss-js caused postcss to not be installed at all. This is fine except in this case of NPM <= 6 when running npx tailwindcss init, or yarn v1, or npm 7/8 with legacy peer deps behavior and doing a similar thing. Deduping will still allow the user to install postcss and upgrade it and Tailwind CSS will pick it up. A more permanent solution may involve hijacking require or something similar.

* Update changelog
2022-02-11 10:08:54 -05:00
Jordan Pittman
9f119e503e 3.0.21 v3.0.21 2022-02-10 18:08:59 -05:00
Jordan Pittman
754dcdd6df Update changelog 2022-02-10 18:07:31 -05:00
Jordan Pittman
15e51e9e54
Move prettier plugin to dev dependencies (#7418)
* Move prettier plugin to dev dependencies

* Update changelog
2022-02-10 18:03:53 -05:00
Robin Malfait
99a8ab118d
3.0.20 v3.0.20 2022-02-10 18:16:01 +01:00
Robin Malfait
9e6dd60d0b
update changelog 2022-02-10 18:16:01 +01:00
Robin Malfait
96d4ce2516
Expose context.sortClassList(classes) (#7412)
* add prettier-plugin-tailwindcss

This will use the prettier plugin in our tests as well, yay consistency!

* ensure that both `group` and `peer` can't be used in `@apply`

This was only configured for `group`

* expose `sortClassList` on the context

This function will be used by the `prettier-plugin-tailwindcss` plugin,
this way the sorting happens within Tailwind CSS itself adn the
`prettier-plugin-tailwindcss` plugin doesn't have to use internal /
private APIs.

The signature looks like this:
```ts
function sortClassList(classes: string[]): string[]
```

E.g.:
```js
let sortedClasses = context.sortClassList(['p-1', 'm-1', 'container'])
```

* update changelog

* add sort test for utilities with the important modifier e.g.: `!p-4`
2022-02-10 18:06:41 +01:00
depfu[bot]
5ea67b0a86 Update postcss to version 8.4.6 2022-02-08 11:58:56 +00:00
Jordan Pittman
2250e1bacd 3.0.19 v3.0.19 2022-02-07 15:58:01 -05:00
Jordan Pittman
cbff982a42 Update changelog 2022-02-07 15:57:16 -05:00
Jonathan Reinink
58bd3016d1
Update CHANGELOG.md 2022-02-07 15:41:15 -05:00
Jordan Pittman
01fbe196c4
Fix negative utility generation and detection when using a prefix (#7295)
* Add failing tests for negative utility detection

We're not generating them properly in all cases, when using at-apply we sometimes crash, and safelisting doesn't currently work as expected.

* Refactor

* Generate utilities for negatives before and after the prefix

* Properly detect negative utilities with prefixes in the safelist

* Refactor test a bit

* Add class list tests

* Update changelog
2022-02-07 10:24:30 -05:00
Jordan Pittman
ab9fd951dd
Use less hacky fix for urls detected as custom properties (#7275)
* Use less hacky fix for urls detected as custom properties

* Add more test cases

* Update changelog
2022-02-07 10:00:19 -05:00
Jordan Pittman
d87bdb2f81 Update changelog 2022-02-07 09:55:28 -05:00
Jordan Pittman
dc6644e0c8
Eliminate recursion from candidatePermutations (#7331) 2022-02-07 09:52:54 -05:00
Adam Wathan
8e38bbc85f
Update LICENSE 2022-02-05 15:22:47 -05:00
Adam Wathan
520d3542ce
Update package.json 2022-02-05 15:21:34 -05:00
depfu[bot]
94ead15f27 Update eslint to version 8.8.0 2022-02-04 21:30:09 +00:00
depfu[bot]
45e17dd6ae Update cssnano to version 5.0.16 2022-02-04 18:14:23 +00:00
depfu[bot]
9f23bb356e Update @swc/register to version 0.1.10 2022-02-03 05:58:03 +00:00
Jordan Pittman
50802e1aed
Correctly parse shadow lengths without a leading zero (#7289)
* Correctly parse shadow lengths without a leading zero

* Update changelog

* Fix code style
2022-02-01 11:54:03 -05:00
Jordan Pittman
dab8b046ea Update changelog 2022-02-01 11:29:04 -05:00
Jordan Pittman
75ba4e0f8f
Fix preflight border color fallback (#7288) 2022-02-01 11:27:42 -05:00
depfu[bot]
fb14b2d561 Update resolve to version 1.22.0 2022-01-31 21:28:37 +00:00
Robin Malfait
ce987357de
3.0.18 v3.0.18 2022-01-28 20:46:16 +01:00