4479 Commits

Author SHA1 Message Date
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
Robin Malfait
44fac9036b
update changelog 2022-01-28 20:46:16 +01:00
Robin Malfait
39193c17e1
Quick fix for incorrect arbitrary properties when using URLs (#7252)
* quick fix for incorrect arbitrary properties

Turns out that using links like [https://example.com] causes arbitrary
properties to generate invalid css.
This is a very dirty quick fix for this specific case, so we have to fix
this properly!

* update changelog
2022-01-28 20:45:24 +01:00
depfu[bot]
0bdc90d0c4 Update postcss-selector-parser to version 6.0.9 2022-01-27 12:28:25 +00:00
Robin Malfait
1868eb6177
Fix @apply order regression (in addComponents, addUtilities, ...) (#7232)
* ensure to partition `@apply` rules generated by addComponents, addUtilities, ...

* update changelog
2022-01-27 13:16:44 +01:00
Robin Malfait
74997f1646
3.0.17 v3.0.17 2022-01-26 19:32:02 +01:00
Robin Malfait
af0914ad7b
update changelog 2022-01-26 19:32:01 +01:00
Robin Malfait
64cf0b8e8a
Remove false positive warning in CLI when using the --content option (#7220)
* ensure content files are available in config

If you use the cli with the `--content` option, then we first resolve
the config (empty), then add the `content` to the config. The issue is
that this means that the content will be empty when you resolve it
initially. This results in a warning in your terminal.

Now, we will make sure to merge 2 configs if you have the `--content`
data passed. We will also make sure to override the final
`config.content.files` to whatever you passed in to make sure that this
is the same behaviour as before.

* update changelog
2022-01-26 19:31:50 +01:00
depfu[bot]
35bac2aadd Update autoprefixer to version 10.4.2 2022-01-26 16:44:04 +00:00
depfu[bot]
490c9dcb29 Update chokidar to version 3.5.3 2022-01-25 07:58:28 +00:00
Robin Malfait
2a9b6c9b10
add missing changelog entries 2022-01-24 14:58:44 +01:00
Robin Malfait
b1c77d6406
3.0.16 v3.0.16 2022-01-24 14:56:48 +01:00
Robin Malfait
837781ad08
update changelog 2022-01-24 14:56:48 +01:00
Jonathan Reinink
bab689ca82
Improve various warnings (#7118) 2022-01-19 15:09:13 -05:00
depfu[bot]
f8ed6a24f4 Update @swc/jest to version 0.2.17 2022-01-19 10:14:14 +00:00
Jordan Pittman
cca5a3804e Fix grammatical mistake 2022-01-17 14:21:43 -05:00
depfu[bot]
b99f380f45 Update cssnano to version 5.0.15 2022-01-17 12:58:45 +00:00
depfu[bot]
3e2a067333 Update fast-glob to version 3.2.11 2022-01-16 13:58:30 +00:00
Robin Malfait
167668e9cf
Ensure to transpile the PostCSS Nesting plugin (tailwindcss/nesting) (#7080)
* ensure that we compile the postcss nesting plugin

* re-add optional chaining

This will allow us to be 100% sure that we can safely call
hasOwnProperty in case we get some very strange objects.

This will now also be compiled/transpiled by esbuild.

* import the internal postcss nesting plugin

This allows us to work on it without re-compiling while running tests.
Just like we do with all other code.

* update changelog
2022-01-15 16:07:20 +01:00
Robin Malfait
61b68a2149
3.0.15 v3.0.15 2022-01-15 02:36:58 +01:00
Robin Malfait
ffa746129d
update changelog 2022-01-15 02:36:57 +01:00
Robin Malfait
7920850728
Temporarily remove optional chaining in nesting plugin (#7077)
* remove optional chaining

This breaks on Node versions lower than version 13. Normally we
transpile everything, but we currently don't do this for the nesting
plugin since it is not really part of the `src` folder.

Will get this fixed in a better way, but for now this is a quick fix to
get everything working again!

* update changelog
2022-01-15 02:36:34 +01:00
Robin Malfait
693608762a
3.0.14 v3.0.14 2022-01-14 18:23:18 +01:00
Robin Malfait
6eda17e691
update changelog 2022-01-14 18:23:18 +01:00
Robin Malfait
adf792b1f8
update changelog 2022-01-14 16:21:10 +01:00
Jordan Pittman
e2928883e8
Only emit utility/component variants when those layers exist (#7066) 2022-01-14 10:20:43 -05:00
Lubomír Blažek
8293c2d33d
Ensure nesting plugins can receive options (#7016)
* fix: options for nesting / nested plugins

* add tests to ensure passing options to postcss plugin works

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2022-01-14 16:20:06 +01:00
Jordan Pittman
bef3838552
Show warnings for invalid content config (#7065) 2022-01-14 09:47:39 -05:00
depfu[bot]
1eb4127de2 Update jest to version 27.4.7 2022-01-12 13:28:58 +00:00
depfu[bot]
6a97fe40d8 Update jest-diff to version 27.4.6 2022-01-11 23:28:32 +00:00
Robin Malfait
62569092e7
3.0.13 v3.0.13 2022-01-11 11:17:10 +01:00
Robin Malfait
556cdfa972
update changelog 2022-01-11 11:17:10 +01:00
depfu[bot]
c8b2b9ad78 Update resolve to version 1.21.0 2022-01-10 21:28:37 +00:00
Jordan Pittman
b5b387233f Test apply partitioning and media queries
This has already been fixed due to another change but wanted to add an explicit test for it
2022-01-10 12:45:34 -05:00
Jordan Pittman
a891867a2f
Fix consecutive builds with at apply producing different CSS (#6999)
* Partition at rules before building context

* remove unnecessary logic

* Update changelog

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2022-01-10 12:36:14 -05:00
depfu[bot]
3a13cfce7b Update @swc/core to version 1.2.127 2022-01-10 12:58:21 +00:00
depfu[bot]
d06c9d6aa9 Update eslint to version 8.6.0 2022-01-08 00:00:46 +00:00
Jordan Pittman
cd17ec03b0
Remove cross-env and postcss-cli deps (#6964) 2022-01-07 15:40:36 -05:00
Jordan Pittman
377886eb81 Update changelog 2022-01-07 12:37:47 -05:00
depfu[bot]
ee35abd97e Update esbuild to version 0.14.10 2022-01-07 16:58:20 +00:00
Robin Malfait
8e0ccda1a1
3.0.12 v3.0.12 2022-01-07 17:42:18 +01:00
Robin Malfait
3dc93c06a3
update changelog 2022-01-07 17:42:11 +01:00
Jordan Pittman
f2d73b8c3d
Change how we handle defaults (optimized or not) (#6926)
Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
2022-01-07 11:39:45 -05:00
Jesper
4bc9ca7d8b
End 'Reading changed files' timer in debug mode (#6954) 2022-01-07 17:08:15 +01:00
Robin Malfait
fe08e919dc
Ensure @apply works consistently with or without @layer (#6938)
* partition nodes as soon as possible

Time to write another story on `@apply`...

When we write code like this:

```css
.a {
  @apply b;
}

.b {
  @apply uppercase;
  color: red;
}
```

Then we create 2 Nodes in our context to keep track of. One has
identifier `a`, the other has identifier `b`. However, when we have an
`@apply` and it contains multiple declarations/atrules, then we have to
split up the (aka partition) node into multiple nodes so that we can
guarantee the correct expected sort order.

This means that the above example technically looks like this:

```css
.a {
  @apply b;
}

.b {
  @apply uppercase;
}

.b {
  color: red;
}
```

If this was your input, then we would still have 1 node for identifier
'a', but we would have 2 nodes for identifier 'b'.

As mentioned earlier, this is important to guarantee the correct order,
here is an example:

```css
.b {
  @apply md:font-bold xl:font-normal; /* Here we can sort by our
  internal rules. This means that the `md` comes before `xl`. */
}
```

... however

```css
.b {
  @apply xl:font-normal; /* This now exists _before_ the example below */
}

.b {
  @apply md:font-bold; /* Because we respect the order of the user's css */
}
```

So to guarantee the order when doing this:
```css
.b {
  @apply xl:font-normal;
  @apply lg:font-normal;
}
```

We also split this up into 2 nodes like this:
```css
.b {
  @apply xl:font-normal;
}
.b {
  @apply lg:font-normal;
}
```

The tricky part is that now only 1 empty `.b` node exists in our context
because we partitioned the orginal node into multiple nodes and moved
the children to the new nodes and because they are new nodes it means
that they have a different identity.

This partitioning used to happen in the expandApplyAtRules code, but
this is a bit too late because the context has already been filled at
this time. Instead, we move the code more to the front, as if you wrote
those separated blocks yourself. Now the code to inject those nodes into
the context happens in a single spot instead of multiple places.

Another good part about this is that we have better consistency between
each layer because it turns out that these two examples generated
different results...

```css
.a {
  @apply b;
}
.b {
  @apply uppercase;
  color: red;
}
```

... is different compared to:

```css
@tailwind components;
@layer components {
  .a {
    @apply b;
  }
  .b {
    @apply uppercase;
    color: red;
  }
}
```

Even if both `a` and `b` are being used in one of your content paths...
Yeah.. *sigh*

* add more `@apply` related tests

* update changelog

* remove support for basic nesting (leftover)

* remove leftover todo

This has been fixed already
2022-01-07 16:41:01 +01:00
Jonathan Reinink
9c72add3b7
Update changelog 2022-01-06 08:20:58 -05:00
Robin Malfait
4562b7cd59
update changelog 2022-01-06 14:17:55 +01:00