Next.js Discord

Discord Forum

When I build my app, Tailwind style is not respected?

Unanswered
Skipjack tuna posted this in #help-forum
Open in Discord
Skipjack tunaOP
I have a selector with tailwind sm: that aligns the text to the start. It works fine on dev, but when I build the app and deploy it, it appears at the center regardless of the screen size. I have no idea why it might be doing this?! Any ideas? I'm using SST to deploy my app

9 Replies

Skipjack tunaOP
It only seems to be doing it in that one place also. Everywhere else sm: selectors are respected
@!=tgt whats your code?
Skipjack tunaOP
<h1 className="flex flex-col justify-center items-center sm:items-start text-4xl sm:text-5xl font-medium tracking-tight flex-grow text-primary-foreground">
                Headline{" "}
                <span className="">
                  <h5 className="text-primary-foreground font-bold animate-in fade-in slide-in-from-bottom-2 duration-700 ease-in-out">
                    word.
                  </h5>
                </span>
              </h1>
Thats on the dev server
working as its supposed to
However after building, on the same screen size:
inspecting element, the exact same classes are applied on the heading
Skipjack tunaOP
That was a weird one, deleting the old .next and .opennext folders and rebuilding seemed to do the trick.