saleyn

saleyn

Error: Cannot apply unknown utility class

After upgrading from Tailwindcss v3.3 to v4.1, I am getting the following error:

$ mix assets.build
...
Generated utilx app
Error: Cannot apply unknown utility class: checked:border-brand-500

The assets/css/app.css contains:

@import "tailwindcss"
@import "../../deps/utilx/assets/inputs.css";

In the Tailwind 4.x upgrade guide they recommend using the @reference /path/to/app.css in the imported file. However, including such a reference results in two problems:

  1. A circular dependency (app.css → inputs.css → app.css)
$ mix assets.build
Error: Exceeded maximum recursion depth while resolving `./theme.css` in `/$bunfs/root`)
  1. From the design point of view it’s unclear why the stand-alone dependency application should reference another (parent) application’s css.

Has anyone found a way to upgrade to Tailwindcss 4.x?

Marked As Solved

saleyn

saleyn

This question was answered on the tailwincss github site:

Hope others find it useful when migrating to Tailwindcss 4.x.

Where Next?

Popular in Questions Top

nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
Lily
In templates/appointment/index.html.eex: <%= for appointment <- @appointments do %> <tr> <td><%= appoi...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New

Other popular topics Top

joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 31525 112
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 44167 214
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New

We're in Beta

About us Mission Statement