18 Commits

Author SHA1 Message Date
Robin Malfait
d288c52780
bump versions to 4.0.0-alpha.6 2024-03-07 16:00:23 +01:00
Robin Malfait
324273ce8d
[v4] Only allow CSS variables in @theme (#13125)
* add `WalkAction` to indicate how the `walk` function should behave

You can `Continue` its execution (the default behaviour), `Skip` walking
the current node, or `Stop` walking entirely.

* walk the nodes of `@theme` directly

There is no need to walk the `@theme` itself or to create a temporary
array here.

* improvement: skip walking

* only allow CSS variables inside `@theme`

* update error message
2024-03-07 15:59:59 +01:00
Adam Wathan
fcaff7c613
[v4] Only set border-style for appropriate border side (#13124)
* Only set border-style for appropriate border side

Fixes #13121.

Something to consider is that this implementation will still have issues if we ever implement support for utilities like `border-r-dashed`. 6am and I just woke up and am going to the gym now but leaving this as a note to consider when I get back before merging :)

* Fix typos in test names

* Revert playground change

---------

Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
2024-03-07 09:11:28 -05:00
Robin Malfait
9864b9c9cd
bump versions to 4.0.0-alpha.5 2024-03-07 00:40:10 +01:00
Robin Malfait
f6d93d1151
replace the homemade clearAnsiEscapes with the native stripVTControlCharacters (#13117) 2024-03-07 00:27:59 +01:00
Robin Malfait
722f436956
bump versions to 4.0.0-alpha.4 (#13113) 2024-03-06 21:00:27 +01:00
Robin Malfait
9bfc1cc30b
add extension less exports for all exported CSS files (#13110) 2024-03-06 20:56:52 +01:00
Robin Malfait
dd2c68080b
bump versions to 4.0.0-alpha.3 (#13106) 2024-03-06 17:27:17 +01:00
Robin Malfait
99e3fdbceb
drop deprecated decoration-slice and decoration-clone utilities (#13107) 2024-03-06 16:57:23 +01:00
Adam Wathan
b3b2debdd9
[v4] Support old important modifier position (#13103)
* Support old important modifier position

* update

---------

Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
Co-authored-by: Jordan Pittman <jordan@cryptica.me>
2024-03-06 10:56:56 -05:00
Robin Malfait
19fcd0ebba
use fs.readFileSync instead of an import (#13104)
In some environments, depending on the Node version importing a `.json`
file without a `with` or `assert` doesn't work.

Let's play it safe and use an `fs.readFileSync` instead.
2024-03-06 10:43:22 -05:00
Robin Malfait
0a2b319ada
bump versions to 4.0.0-alpha.2 2024-03-06 15:13:45 +01:00
Robin Malfait
2ba42fe53d
Copy README file to every package (#13096)
* copy README file to every package

* point workflow status badge to correct workflow file
2024-03-06 08:49:31 -05:00
Robin Malfait
0597489604
Move the CLI to its own package @tailwindcss/cli (#13095)
* move `cli` to its own package `@tailwindcss/cli`

* minify builds when using `tsup`

* prefer tsup cli flag over tsup.config.ts file

* add `--clean`, to make sure `dist/` folders are cleaned before building

* make CLI esm only

* use version of `tailwindcss` instead of the version of `@tailwindcss/cli`
2024-03-06 05:41:12 -05:00
Robin Malfait
bab74da932
Prep alpha release (#13089)
* use `next` as default release channel

* bump versions to `4.0.0-alpha.1`
2024-03-05 14:46:10 -05:00
Robin Malfait
ca07ca8c69
Only output @property foo once instead of N times (#13087)
* only output `@property foo` once instead of N times

* compute the indent once

* improve performance by using strings and for-loops

* drop unnecessary new line
2024-03-05 18:04:33 +01:00
Robin Malfait
191643f663
pretty print generated CSS by default (#13086)
The pretty printing is fairly basic, but it adds some space between
properties `color: red;`, adds newlines after `;`, `{`, and `}`.

Last but not least, it indents nested CSS based on depth with 2 spaces.
2024-03-05 17:58:17 +01:00
Robin Malfait
a68de1df27
introduce v4 codebase 2024-03-05 14:29:15 +01:00