tailwind.com 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/NOTICE CHANGED
@@ -10,10 +10,18 @@ source of this repository keeps the license texts in licenses/.
10
10
 
11
11
  Tailwind CSS 4.3.5 (the compiler that native/tailwind follows file by
12
12
  file, the stylesheets in native/tailwind/assets, the plugin layer in
13
- native/tailwind/assets/compat.js, the scanner crate tailwindcss-oxide,
14
- and the recorded test data in tests/upstream)
13
+ native/tailwind/assets/compat.js, the scanner crates in native/scanner
14
+ (crates/oxide and crates/classification-macros of Tailwind CSS), and the
15
+ recorded test data in tests/upstream)
15
16
  Copyright (c) Tailwind Labs, Inc.
16
17
  MIT License (licenses/tailwindcss.txt).
18
+
19
+ ignore 0.4.33, as Tailwind CSS changed it (the matching of .gitignore
20
+ files for the scanner, in native/scanner/ignore)
21
+ Copyright (c) 2015 Andrew Gallant.
22
+ MIT License or the Unlicense (native/scanner/ignore/LICENSE-MIT,
23
+ native/scanner/ignore/UNLICENSE).
24
+ https://github.com/BurntSushi/ripgrep/tree/master/crates/ignore
17
25
  https://github.com/tailwindlabs/tailwindcss
18
26
 
19
27
  Lightning CSS 1.0.0-alpha.72 (the optimizer of --minify and --optimize)
@@ -33,7 +41,7 @@ packages that Tailwind CSS uses for its source maps)
33
41
  (licenses/jridgewell.txt).
34
42
 
35
43
  QuickJS 2026-06-04 (the JavaScript engine for @plugin and @config, in
36
- c_src/quickjs)
44
+ native/tailwind/c_src/quickjs)
37
45
  Copyright (c) 2017-2021 Fabrice Bellard; Copyright (c) 2017-2021
38
46
  Charlie Gordon.
39
47
  MIT License (licenses/quickjs.txt).
@@ -71,6 +79,12 @@ Cosmopolitan Libc 4.0.2 (the C runtime of the APE file)
71
79
  of other projects under the licenses that its source names.
72
80
  https://github.com/jart/cosmopolitan
73
81
 
82
+ mimalloc 2.3.2 (the allocator of the file, and of the program of
83
+ "cargo build", from the crate libmimalloc-sys 0.1.49)
84
+ Copyright (c) 2018-2025 Microsoft Corporation, Daan Leijen.
85
+ MIT License (licenses/mimalloc.txt).
86
+ https://github.com/microsoft/mimalloc
87
+
74
88
  The Rust standard library and musl (in the Rust library of the file)
75
89
  Copyright The Rust Project Developers; Copyright 2005-2020 Rich Felker
76
90
  and the contributors of musl.
@@ -81,9 +95,9 @@ The other Rust crates of Cargo.lock
81
95
  Each crate has its license in its source (MIT, Apache-2.0, MPL-2.0,
82
96
  BSD or Unlicense). "cargo tree" lists them.
83
97
 
84
- c_src/cosmo_rust.c, c_src/eh_frame_pad.ld and scripts/rust_link.sh come
98
+ native/tailwind/c_src/cosmo_rust.c, native/tailwind/c_src/eh_frame_pad.ld and scripts/rust_link.sh come
85
99
  from BEAM.com (Apache License 2.0), by the same author. The parts of
86
- c_src/watch.c for inotify and kqueue, and the job bsd of
100
+ native/tailwind/c_src/watch.c for inotify and kqueue, and the job bsd of
87
101
  .github/workflows/build.yml, follow the file watcher and the job
88
102
  test-bsd of BEAM.com.
89
103
  https://github.com/sntran/BEAM.com
package/README.md CHANGED
@@ -60,7 +60,7 @@ tailwind.com [--input input.css] [--output output.css] [--watch] [--poll=ms] [op
60
60
  In `mix.exs`, replace the Hex package `tailwind`:
61
61
 
62
62
  ```elixir
63
- {:tailwind, github: "sntran/tailwind.com", tag: "v0.2.0", runtime: Mix.env() == :dev}
63
+ {:tailwind, github: "sntran/tailwind.com", tag: "v0.4.0", runtime: Mix.env() == :dev}
64
64
  ```
65
65
 
66
66
  The modules of a release download the `tailwind.com` of that release.
@@ -83,7 +83,8 @@ config :tailwind,
83
83
  `version` can be each version of Tailwind CSS 4, for example the
84
84
  `"4.3.0"` of a new Phoenix 1.8.9 project: the file has all of them.
85
85
 
86
- `mix tailwind.install` downloads `tailwind.com` to `_build/`, and
86
+ `mix tailwind.install` downloads `tailwind.com` to the priv directory of
87
+ the application `tailwind` (`Tailwind.install_path/0`), and
87
88
  `mix tailwind my_app` runs it. The watcher of the endpoint
88
89
  (`tailwind: {Tailwind, :install_and_run, [:my_app, ~w(--watch)]}`) works
89
90
  as before: the watch stops when the Phoenix server stops.
@@ -96,10 +97,34 @@ the official program, byte for byte, for the two layouts of Phoenix 1.8:
96
97
  daisyUI in `assets/vendor` (to 1.8.5), and daisyUI in `deps/` with
97
98
  `NODE_PATH` and the `phoenix-colocated` import (1.8.6 and later).
98
99
 
100
+ A release has the priv directory of the application `tailwind`, so a
101
+ program can build CSS at run time with `Tailwind.run/2`. For that, the
102
+ line of the dependency must not have `runtime: Mix.env() == :dev` (the
103
+ line of a new Phoenix project): without it, the release does not have
104
+ the application `tailwind`. In a program of BEAM.com, `tailwind.com` runs
105
+ from `/zip`.
106
+
99
107
  An Erlang project uses the module `tailwind` (`tailwind:install/0`,
100
108
  `tailwind:run/2`), with the same configuration in the application
101
109
  environment.
102
110
 
111
+ The program can also run in the Erlang VM, as a NIF: no process and no
112
+ download, and a small build takes a third of the time. A builder (for
113
+ example the builder of BEAM.com) builds the NIF and puts it in `priv`,
114
+ and the project does not change. See [`docs/NIF.md`](docs/NIF.md).
115
+
116
+ `mix format` can sort the classes of the templates, as the Prettier
117
+ plugin of Tailwind CSS does, with the theme and the version of the
118
+ project: put `Tailwind.Formatter` before
119
+ `Phoenix.LiveView.HTMLFormatter` in the `plugins` of `.formatter.exs`.
120
+ See [`docs/FORMATTER.md`](docs/FORMATTER.md).
121
+
122
+ CSS functions, mixins, conditions and tree counting (`@function`,
123
+ `@mixin`, `@apply --name`, `if()`, `@when`, `sibling-index()`) need the
124
+ optimizer: add `--optimize` to the arguments of the profile, so the
125
+ watcher in development lowers them too. See
126
+ [`docs/MIXINS.md`](docs/MIXINS.md).
127
+
103
128
  ## npm
104
129
 
105
130
  This repository is also the npm package `tailwind.com`:
@@ -221,8 +246,8 @@ A differential fuzzer also compares the two compilers live on new random
221
246
  stylesheets, classes and projects, in CI for each change of the compiler
222
247
  and each night.
223
248
 
224
- The scanner of source files is the Rust crate of Tailwind CSS itself
225
- (`tailwindcss-oxide`), and `--minify` and `--optimize` use the same
249
+ The scanner of source files is the Rust code of Tailwind CSS itself
250
+ (`crates/oxide`, a copy with no change in `native/scanner`), and `--minify` and `--optimize` use the same
226
251
  version of Lightning CSS with the same options.
227
252
 
228
253
  ## JavaScript plugins and configs
@@ -289,6 +314,14 @@ differences.
289
314
 
290
315
  See [`docs/ROADMAP.md`](docs/ROADMAP.md).
291
316
 
317
+ ## Rust
318
+
319
+ The compiler is also a Rust crate, `tailwind`, with the library
320
+ `tailwind`: compile a stylesheet and build the CSS of the candidates in a
321
+ Rust program, as each version of Tailwind CSS 4. The scanner of Tailwind
322
+ CSS is `tailwind::scanner`. See [`native/tailwind/README.md`](native/tailwind/README.md).
323
+ The release job publishes it to crates.io.
324
+
292
325
  ## WebAssembly
293
326
 
294
327
  `tailwind.wasm` of each release is the same program for WASI
@@ -309,6 +342,9 @@ runs it in the browser, with a small WASI host in JavaScript
309
342
  | [`docs/BUILDING.md`](docs/BUILDING.md), [`docs/TESTING.md`](docs/TESTING.md) | Build `tailwind.com`, and the tests. |
310
343
  | [`docs/BENCHMARKS.md`](docs/BENCHMARKS.md) | The time, the memory and the size, against the official programs. |
311
344
  | [`docs/SITE.md`](docs/SITE.md) | The site on GitHub Pages: `tailwind.wasm` in the browser, with each version. |
345
+ | [`docs/MIXINS.md`](docs/MIXINS.md) | CSS functions, mixins, conditions, tree counting and math (`@function`, `@mixin`, `if()`, `@when`, `sibling-index()`, `round()`, `progress()`): the optimizer lowers them for the browsers of Tailwind CSS. |
346
+ | [`docs/FORMATTER.md`](docs/FORMATTER.md) | The sort of classes of HEEx templates with `mix format`, as the Prettier plugin of Tailwind CSS does. |
347
+ | [`docs/NIF.md`](docs/NIF.md) | The program as a NIF in the Erlang VM, for a builder such as the builder of BEAM.com. |
312
348
  | [`docs/SYNC.md`](docs/SYNC.md) | Move to a new version of Tailwind CSS. |
313
349
  | [`docs/ROADMAP.md`](docs/ROADMAP.md) | What comes next. |
314
350
  | [`CHANGELOG.md`](CHANGELOG.md) | The changes of each version. |
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2018-2025 Microsoft Corporation, Daan Leijen
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tailwind.com",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "description": "Tailwind CSS in one executable file, with no Node.js at run time: npx tailwind.com, and the same compiler as WebAssembly",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -1 +1 @@
1
- {"version": "0.2.0", "tag": "v0.2.0", "tailwindcss": "4.3.5", "sha256": "fef33f11c8afd26c3d7e2be9de7bd46171b8c36bb359200e4dd2c62e4235ebc9"}
1
+ {"version": "0.4.0", "tag": "v0.4.0", "tailwindcss": "4.3.5", "sha256": "10e5fc67a22e2954d01c50073befa429aebdcd9ab6e1f41a8bfb51aa606e1083"}
Binary file