tailwindcss/packages
Robin Malfait f1221b3fce
Ensure font-size utilities with none modifier works e.g.: text-sm/none (#15921)
This PR fixes an issue where classes such as `text-sm/none` don't work
as expected. The reason for this is that `leading-none` is the only
hardcoded leading utility and is not coming from the `@theme`. This
means that `text-sm/none` tries to do a lookup for `none` but it won't
resolve.

This PR fixes that by allowing `none` as a modifier.

While working on this, I noticed that `text-sm/none` _did_ generate CSS:

```css
.text-sm\/none {
  font-size: var(--text-sm);
}
```

Notice that the `line-height` is missing. This means that any modifier
that can't be resolved doesn't get the `line-height` set, but it _will_
generate CSS. In this case, no CSS should have been generated.

Otherwise, all of these generate CSS which will only bloat your CSS and
won't
work as expected. E.g.: `text-sm/foo`, `text-sm/bar`, and `text-sm/baz`:

```css
.text-sm\/bar {
  font-size: var(--text-sm);
}
.text-sm\/baz {
  font-size: var(--text-sm);
}
.text-sm\/foo {
  font-size: var(--text-sm);
}
```

Fixes: #15911
2025-01-27 14:10:09 +01:00
..
@tailwindcss-browser Prepare v4.0.0 release (#15693) 2025-01-21 20:58:59 +00:00
@tailwindcss-cli Prepare v4.0.0 release (#15693) 2025-01-21 20:58:59 +00:00
@tailwindcss-node Prepare v4.0.0 release (#15693) 2025-01-21 20:58:59 +00:00
@tailwindcss-postcss Prepare v4.0.0 release (#15693) 2025-01-21 20:58:59 +00:00
@tailwindcss-standalone Prepare v4.0.0 release (#15693) 2025-01-21 20:58:59 +00:00
@tailwindcss-upgrade Prepare v4.0.0 release (#15693) 2025-01-21 20:58:59 +00:00
@tailwindcss-vite Prepare v4.0.0 release (#15693) 2025-01-21 20:58:59 +00:00
internal-example-plugin Prefix internal modules with internal-* (#14074) 2024-07-29 10:58:07 -04:00
tailwindcss Ensure font-size utilities with none modifier works e.g.: text-sm/none (#15921) 2025-01-27 14:10:09 +01:00
tsconfig.base.json Improve debug logs (#15303) 2024-12-11 15:27:20 +01:00