You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
npm run dev and then visit http://localhost:5173 will work
Describe your issue
Using the legacy JavaScript config in v4.0.10, the theme font configuration with the name Title1_Strong does not generate a utility class, whereas Title_Strong does. In v4.0.9 and earlier versions, both utility classes were generated properly. The text-Title_Strong utility class is created, but text-Title1_Strong is not.
It appears that any font names following the \d_ pattern do not generate utility classes. However, other patterns such as Title1Strong and Title__Strong work properly.
tailwind config
created css
The text was updated successfully, but these errors were encountered:
I’ve submitted #16980 to address this issue. If there are any concerns or if this isn’t the right approach, please feel free to close it. Thank you for your time and consideration :)
…xtracted correctly (#16980)
Fixes#16978, and also added support for dash.
Classes like `text-theme1-primary` or `text-theme1_primary` should be
treated as valid.
If this approach is not aligned with the project’s direction or there
are any concerns, please feel free to close or edit this PR 😃
<br/>
### As is
Classes conatining number followed by dash or underscore (e.g.
`bg-theme1-primary`, `text-title1_strong`) are ignored, and utility
classes are not generated.
### To be
Classes conatining number followed by dash or underscore (e.g.
`bg-theme1-primary`, `text-title1_strong`) are treated as valid
tailwindcss classes
---------
Co-authored-by: Philipp Spiess <[email protected]>
What version of Tailwind CSS are you using?
v4.0.10
What build tool (or framework if it abstracts the build tool) are you using?
Vite 6.2.0
What version of Node.js are you using?
v20.18.1
What browser are you using?
Chrome
What operating system are you using?
macOS
Reproduction URL
https://github.com/woohm402/tailwindcss-4.0.10-bug-reproduction-1
npm run dev
and then visithttp://localhost:5173
will workDescribe your issue
Using the legacy JavaScript config in
v4.0.10
, the theme font configuration with the nameTitle1_Strong
does not generate a utility class, whereasTitle_Strong
does. Inv4.0.9
and earlier versions, both utility classes were generated properly. Thetext-Title_Strong
utility class is created, buttext-Title1_Strong
is not.It appears that any font names following the
\d_
pattern do not generate utility classes. However, other patterns such asTitle1Strong
andTitle__Strong
work properly.The text was updated successfully, but these errors were encountered: