No description
Find a file
Robin Malfait b4a20af4d0
Improve upgrade tool to pretty print --spacing(2) (#15596)
This PR improves the upgrade tool to make sure that newly upgraded
`--spacing(2)` CSS functions is pretty printed to prevent unambiguous
looking classes (even though it compiles correctly).

If you have a class such as `m-[calc(100dvh-theme(spacing.2))]`, then we
used to convert it to `m-[calc(100dvh-calc(var(--spacing)*2))]`. But
recently we introduced the `--spacing(2)` CSS function which means that
the output now looks like this instead: `m-[calc(100dvh---spacing(2))]`.

The triple `-` is valid because the first `-` is the minus sign, the
next two `-` characters are from the function.

One solution is to introduce spaces via underscores:

```
m-[calc(100dvh_-_--spacing(2))]
```

But a simpler solution, is to wrap the `--spacing(2)` in parens to
remove the underscores and improve the readability of the `---`
characters.

```
m-[calc(100dvh-(--spacing(2)))]
```
2025-01-10 09:07:23 -05:00
.github Add musl binaries to the Standalone CLI (#15567) 2025-01-09 09:24:33 -05:00
crates Prepare v4.0.0-beta.9 release (#15583) 2025-01-09 17:04:34 +00:00
integrations Migrate theme(…) to --theme(…), migrate calc(var(--spacing)*x) to --spacing(x) (#15579) 2025-01-09 17:17:07 +01:00
packages Improve upgrade tool to pretty print --spacing(2) (#15596) 2025-01-10 09:07:23 -05:00
patches Upgrade lightningcss to 1.29.1 (#15593) 2025-01-10 14:09:13 +01:00
playgrounds Update @types/react 18.3.12 → 19.0.2 (major) (#15588) 2025-01-10 13:14:27 +00:00
scripts Fix integration tests on Windows (#14824) 2024-10-30 11:26:29 +00:00
.gitignore Add test.debug to integration tests (#14133) 2024-08-08 12:02:19 +02:00
.npmrc introduce v4 codebase 2024-03-05 14:29:15 +01:00
.prettierignore Hoist oxide/crates to just crates (#13333) 2024-03-23 09:00:48 -04:00
Cargo.lock Auto source detection improvements (#14820) 2024-10-29 20:33:34 +00:00
Cargo.toml Hoist oxide/crates to just crates (#13333) 2024-03-23 09:00:48 -04:00
CHANGELOG.md Improve upgrade tool to pretty print --spacing(2) (#15596) 2025-01-10 09:07:23 -05:00
LICENSE Add README, LICENSE, and CONTRIBUTING (#13088) 2024-03-05 14:45:39 -05:00
package.json Upgrade lightningcss to 1.29.1 (#15593) 2025-01-10 14:09:13 +01:00
pnpm-lock.yaml Update @types/react 18.3.12 → 19.0.2 (major) (#15588) 2025-01-10 13:14:27 +00:00
pnpm-workspace.yaml Upgrade lightningcss to 1.29.1 (#15593) 2025-01-10 14:09:13 +01:00
README.md Copy README file to every package (#13096) 2024-03-06 08:49:31 -05:00
rust-toolchain.toml Bring back rust-toolchain.toml (#14585) 2024-10-03 14:37:24 +00:00
turbo.json Auto source detection improvements (#14820) 2024-10-29 20:33:34 +00:00
vitest.workspace.ts introduce v4 codebase 2024-03-05 14:29:15 +01:00

Tailwind CSS

A utility-first CSS framework for rapidly building custom user interfaces.

Build Status Total Downloads Latest Release License


Documentation

For full documentation, visit tailwindcss.com.

Community

For help, discussion about best practices, or any other conversation that would benefit from being searchable:

Discuss Tailwind CSS on GitHub

For chatting with others using the framework:

Join the Tailwind CSS Discord Server

Contributing

If you're interested in contributing to Tailwind CSS, please read our contributing docs before submitting a pull request.