tailwindlabs / tailwindcss

A utility-first CSS framework for rapid UI development.
https://tailwindcss.com/
MIT License
83.28k stars 4.22k forks source link

[v4] font family config breaks in `4.0.0-alpha.32` #14985

Closed F-fengzi closed 1 week ago

F-fengzi commented 1 week ago

What version of Tailwind CSS are you using?

v4.0.0-alpha.33

What build tool (or framework if it abstracts the build tool) are you using?

vite 5.4.11, @tailwindcss/vite 4.0.0-alpha.33, svelte 5.4.16

What version of Node.js are you using?

v20.17.0

What browser are you using?

Chrome 130

What operating system are you using?

Windows

Reproduction URL

https://play.tailwindcss.com/8JDdWlTAd5

Describe your issue

Custom font family config in @theme stops working at 4.0.0-alpha.32. Confirmed working in 4.0.0-alpha.31.

Elements fell back to the default font. The expected behavior is to use the font family defined in @theme. Successfully reproduced the issue in the above Playground url. To reproduce yourself, use Tailwind 4.0.0-alpha.32 and configure a custom font family.

philipp-spiess commented 1 week ago

@F-fengzi Hey! This is actually a change that we've made to the --font-family variable. It's now called --font only: https://github.com/tailwindlabs/tailwindcss/pull/14885

We somehow forgot about adding this to the changelog though, I will add this right away. Sorry for the troubles.

F-fengzi commented 1 week ago

Oh 😅! That makes more sense, you guys did change a lot in 32.

Thanks! Hopefully this helps future people too.

philipp-spiess commented 1 week ago

you guys did change a lot in 32

Getting ready for a beta release very soon 🤞 After that the API will be a lot more stable*

(* although we still might make changes before the official release, no guarantees haha)

F-fengzi commented 1 week ago

Coooool, excited for it :D