4254 Commits

Author SHA1 Message Date
Sachin Raja
aeaa2a376b
update build script name in CONTRIBUTING.md (#5814) 2021-10-17 10:09:28 -04:00
depfu[bot]
2bef641909 Update @swc/cli to version 0.1.51 2021-10-16 10:58:31 +00:00
depfu[bot]
c4c10d55d4 Update jest-diff to version 27.2.5 2021-10-15 14:14:00 +00:00
Brad Cornes
be36eba7cf Update changelog 2021-10-13 20:06:47 +01:00
Brad Cornes
84a6c5d096
Neaten extract.DEFAULT resolution (#5778) 2021-10-13 19:58:58 +01:00
Brad Cornes
92df04d0c3
Fix CLI --content option (#5775)
* Add failing test

* Fix CLI `--content` option
2021-10-13 19:58:15 +01:00
Adam Wathan
1a08732382 Update changelog 2021-10-13 10:06:12 -04:00
Brad Cornes
f599430d56
Configure awaitWriteFinish for chokidar (#5774)
* Configure `awaitWriteFinish` for chokidar

* Enable `awaitWriteFinish` on Windows only
2021-10-13 12:59:26 +01:00
Adam Wathan
a7c89c8813
Don't use pointer cursor on disabled buttons by default (#5772) 2021-10-13 06:11:28 -04:00
Adam Wathan
25c8223d60 Update changelog 2021-10-12 13:36:44 -04:00
MichaelAllenWarner
8259dfdf48
Add text-decoration-color utilities (#5760)
* utilities and tests in place for textDecorationColor and textDecorationOpacity

* change 'backgroundColor' to 'textDecorationColor' in corePlugin declaration for latter

* remove explicit textDecorationOpacity utility (the JIT slash syntax suffices)

Co-authored-by: Michael Warner <michaelwarner@Michaels-MacBook-Pro.local>
2021-10-12 13:35:59 -04:00
depfu[bot]
35a5e64bf6 Update esbuild to version 0.13.4 2021-10-12 14:58:39 +00:00
Adam Wathan
0e0d71205b Update changelog 2021-10-09 09:49:01 -04:00
Adam Wathan
d2b53cd3af
Add grow and shrink aliases (#5733)
This adds `grow-*` and `shrink-*` utilities as aliases for `flex-grow-*` and `flex-shrink-*` since those names are unnecessarily verbose. We will stop documenting the long form ones and consider them deprecated.

```diff
- <div class="flex-grow-0 flex-shrink">
+ <div class="grow-0 shrink">
```
2021-10-09 09:48:12 -04:00
Adam Wathan
6d04c2dcc7 Update changelog 2021-10-09 09:47:50 -04:00
Sung M. Kim
10886b3a35
Support all utilities in JIT mode: https://github.com/tailwindlabs/tailwindcss/discussions/5724 (#5734) 2021-10-09 09:46:58 -04:00
Adam Wathan
899a46088d Remove reference to undefined variable in DEBUG mode 2021-10-08 10:13:58 -04:00
Adam Wathan
70d3e7f5e8 Update changelog 2021-10-07 15:25:07 -04:00
Adam Wathan
3942469e9c Update changelog 2021-10-07 09:14:24 -04:00
Luke Warlow
f2d2a0e3cd
Add min-content and max-content utilities for (min/max) height (#5729) 2021-10-07 09:13:50 -04:00
Brad Cornes
30b76cf472 Use join instead of resolve and update path import
This fixes `pkg` bundling
2021-10-07 12:49:32 +01:00
Brad Cornes
5b4baea1d6 Use path.resolve instead of string concatenation
This allows the path to be statically analysed when bundling, for example with `pkg`
2021-10-07 12:33:23 +01:00
Robin Malfait
ee0f32908d
Ensure we log flag notices (#5726) 2021-10-07 12:52:53 +02:00
Luke Warlow
31a9860fe5
Add fit-content utilities for (min/max) height and width (#5638) 2021-10-07 06:08:22 -04:00
depfu[bot]
579e922fc8 Update glob-parent to version 6.0.2 2021-10-06 22:27:47 +00:00
Adam Wathan
6ce8864f47 Update changelog 2021-10-06 13:42:49 -04:00
Adam Wathan
97062c398b
Make negative values a first-class feature, rather than theme-driven (#5709)
* WIP

* Add failing test for negating default values

* Add dynamic negative value opt-in (#5713)

* Add `supportsNegativeValues` plugin option

* Update `getClassList` to support dynamic negative values

* Add test for using a negative scale value with a plugin that does not support dynamic negative values

* Support dynamic negation of `DEFAULT` values (#5718)

* Add test case

Co-authored-by: Brad Cornes <bradlc41@gmail.com>
2021-10-06 13:42:05 -04:00
Robin Malfait
b661614265
Enable optimize universal defaults by default (#5635)
* enabled `optimizeUniversalDefaults` by default

This PR is done in a way so that the default is set to `true`, but you
can still disable it if it causes issues. In this case we do appreciate
an issue in that case 😅.

* update tests to use optimized universal selector

* update integration tests

* add dedicated tests for the optimized universal selector

* improve minimumImpactSelector algorithm

I think I cracked the algorithm, but I will probably need another pair
of eyes on the subject.

The current implementation works like this:

Prerequisites:

- The selector should already have been parsed using the selectorParser
  from 'postcss-selector-parser'.

Algorithm:

1. Remove all of the pseudo classes from the list of nodes.
  1.1. We do want to keep pseudo elements (E.g.: `::before`, `::first-line`, ...)
  1.2. We do want to keep pseudo classes that contain nodes (E.g.:
    `:not(...)`)
2. Reverse the list of nodes.
  This will make it easier to search from the end to the start. For
  example `.group:hover .group-hover` should result in `.group-hover`
  not `.group`.
  2.1. Find the index of the best match (class, id, attribute), and
    convert the node if required. (E.g.: `span#app` -> `#app` => `[id="app"]`)
  2.2. Remove the rest of the selector that is not important anymore
  2.3. Re-join the left-over nodes together

* update tests using new algorithm

* also look for `tag` types

* take `tag` into account

* simplify logic

* add test to prove `rest.reverse()` in first case is required

In case we don't find a match (idx === -1), we use `rest.reverse()`.
However, it looks like you can just use `nodes` instead.
This is not entirely true, because the `rest` variable will contain only
the nodes that are not pseudo elements.

`*:hover` would result in `*:hover` instead of just `*`

* replace all nodes after > with a single universal selector
2021-10-06 17:45:26 +02:00
depfu[bot]
7b94feaef3 Update jest to version 27.2.4 2021-10-05 10:27:50 +00:00
Adam Wathan
cca75e67fb Update changelog 2021-10-04 15:53:52 -04:00
Adam Wathan
a2676b0544
Add flex-basis utilities (#5671) 2021-10-04 15:47:14 -04:00
depfu[bot]
778bd37838 Update is-glob to version 4.0.3 2021-10-03 22:57:43 +00:00
Adam Wathan
e362272631 Update changelog 2021-10-02 05:59:15 -04:00
depfu[bot]
abad3b1a10 Update @swc/core to version 1.2.92 2021-10-02 08:13:04 +00:00
Jonathan Reinink
d50b049ae5 Update changelog 2021-10-01 15:43:14 -04:00
Jonathan Reinink
6b26174921 Update changelog 2021-10-01 15:32:26 -04:00
Jonathan Reinink
ba06a102d2 Update changelog 2021-10-01 15:02:36 -04:00
Jonathan Reinink
53ae5d53d8 Update changelog 2021-10-01 13:45:41 -04:00
Robin Malfait
86b254abda
update integration tests for alpha version 2021-10-01 19:06:24 +02:00
Robin Malfait
c42ffc10a1
update integration tests for alpha version 2021-10-01 18:56:47 +02:00
Jonathan Reinink
95831fd2f8 Update changelog 2021-10-01 12:50:05 -04:00
Adam Wathan
ac98ff4753 3.0.0-alpha.1 v3.0.0-alpha.1 2021-10-01 11:56:49 -04:00
Adam Wathan
3eb4079d95
Update release.yml 2021-10-01 11:54:43 -04:00
Jonathan Reinink
b8cda161dd
Improve warnings (#5666) 2021-10-01 11:47:02 -04:00
depfu[bot]
55cf56476e Update autoprefixer to version 10.3.6 2021-10-01 15:42:56 +00:00
Robin Malfait
bd21bef99a
Polish match APIs (#5664)
* fix incorrect logic for validating content paths

* remove `includeRules` helper

* generate keyframes as part of the animate plugin

* add matchUtilities

* splitup `variantPlugins` and `corePlugins`
2021-10-01 17:31:09 +02:00
Robin Malfait
d94541cbf3
Handle old to new config when normalizing the config (#5658)
* immediately take the `safelist` values into account

Currently we had to manually add them in the `setupTrackingContext`,
`setupWatchingContext` and the `cli`.

This was a bit cumbersome, because the `safelist` function (to resolve
regex patterns) was implemented on the context. This means that we had
to do something like this:

```js
let changedContent = []
let context = createContext(config, changedContent)
for (let content of context.safelist()) {
  changedContent.push(content)
}
```

This just feels wrong in general, so now it is handled internally for
you which means that we can't mess it up anymore in those 3 spots.

* drop the dot from the extension

Our transformers and extractors are implemented for `html` for example.
However the `path.extname()` returns `.html`.

This isn't an issue by default, but it could be for with custom
extractors / transformers.

* normalize the configuration

* make shared cache local per extractor

* ensure we always have an `extension`

Defaults to `html`

* splitup custom-extractors test

* update old config structure to new structure

* ensure we validate the "old" structure, and warn if invalid

* add tests with "old" config, to ensure it keeps working

* add missing `content` object

* inline unnecessary function abstraction
2021-10-01 12:56:54 +02:00
Jonathan Reinink
109c1c563d Change color warning key 2021-10-01 06:44:05 -04:00
Brad Cornes
ba9d177891
Rename completions and remove color information (#5662) 2021-10-01 09:41:27 +01:00
Jonathan Reinink
84db333d46 Add warning about RTL features being in preview
Co-Authored-By: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
2021-09-30 21:18:31 -04:00