wktdev
Is there a command that Phoenix can be generated with that removes tailwind and only uses the most vanilla CSS?
I would like to be able to have a straight vanilla CSS setup. so that when I go to assets/css/app.css I can apply css to any element, including the body tag with no problems. FYI I am working in LiveView.
As it stands when I try to use assets/css/app.css I can’t seem to apply styles.
When I go to the statis/assets/app.css file it works as expected but I assume those will be overwritten during copile/server start up.
Thank you!
Trending in Questions
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
Hello,
I’m trying to build a basic Phoenix web-app, and I’d like to use Tailwind.
However, when I launch mix phx.server, I get an error...
New
Hi everyone,
I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding.
I sta...
New
I’m working on a small exercise involving update_in/3, and I came up with this solution:
data = %{
name: "Periodic Table",
category:...
New
I’ve got trouble wrapping my head around the order in which functions are called in this snippet (from Phoenix’s authentication):
toke...
New
Is there any way to avoid the Hologram compiler running when using iex? It seems like the front-end code could potentially be disregarded...
New
** (ArgumentError) expected :max_attempts to be a positive integer, got: {:@, [line: 10, column: 19], [{:max_attempts, [line: 10, column:...
New
Other Trending Topics
Edit: 2026 May 15 - This post is archived.
Mob is alive!!
Main docs: mob v0.7.11 — Documentation
A bit of explanation for the slightly c...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
A little off-topic, but I feel like people here have a good head on their shoulders.
I used to be quite good at making software. Was luc...
New
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ai
- #ecto-query
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #metaprogramming
- #hex










Showing Posts 1 to 7- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
mad
Phoenix will soon have a new generator flag:
--no-tailwindhttps://github.com/phoenixframework/phoenix/blob/main/CHANGELOG.md#172-dev
abar
Just in case someone stumbles upon this page like I did: if you have already generated a Phoenix application, and only later decided that you want to get rid of Tailwind, then you should do the following:
:tailwindfrommix.exstailwind.install,tailwind defaultfromaliasesinmix.exs(make sure to preserveesbuild-related commands, if you still plan to use that!)@import "tailwindcss/...fromapp.css/assets/tailwind.config.jsconfig :tailwindfromconfig.exstailwind: {Tailwind, :install_and_run, [:default, ~w(--watch)]}fromwatchersinsidedev.exsmix deps.clean --unlock --unusedBoom! Your app has been de-tailwindizied! Now all that remains is to remove
god awfulTailwind classes incore_components.exsand fix layouts, but that is on you!finnillson
Why are the core_components still being generated with tailwind classes when the --no-tailwind flag is used?
Look, I’m all for using what works for you but I feel like the framework should be a little more agnostic to what CSS “framework” someone might want to use.
The core_components should be generated with no CSS applied by default and should be as semantic as possible when it comes to HTML and what tags are used. The table component does not used attribute scope=“row” for example.
Personally, tailwind is a huge /fail/ and should not belong in the default generators. Put that stuff behind a flag.
MrSidecar
I’m really only chiming in to say that for the longest time I was afraid that I might be the only one having this major gripe.
When I started discovering Phoenix (back in the 1.4 days I think it was) and especially after LiveView, I was sure I had found my most loved framework of all time. Now they’ve jumped the Tailwind bandwagon and make it extremely hard/painful for us who actually remember the horrid days of inline styling, to opt out of if. I won’t share my rant-like opinion on Tailwind here, and really whatever floats anyone’s boat, but please put it behind a flag.
mlncn
One more critical step!
Restore to
assets/js/app.jsthe line:or equivalent.
This is needed for esbuild to automatically bundle the CSS and write it to the same directory as your
app.js(as documented in deps/esbuild/README.md).At least for our project, after following the upgrade steps, that line had been removed, and although we did not need it for actually using the CSS we needed it for esbuild to do its work.
As for core_components being polluted with tailwind classes, i agree, but we are informed if we want to change the classes in core_components we need to override each one.
Josh
I started thinking about this after trying to remove Tailwind yesterday. I haven’t tried this yet, and it’s apparently the “wrong” way to use Tailwind, but it’s possible to create reusable classes with
@apply. The page says:…which is what some people want.
3 out of 4 of the disadvantages it lists aren’t really problems for people who don’t want to use Tailwind.
There’s also a Tailwind component library called daisyUI that looks like it might be based on that idea.
It isn’t a perfect solution, but I’m just trying to get the CSS out of the way as quickly as possible, and I don’t want to do things the Tailwind way because it’s slower and adds cognitive load.
Edit: I tried daisyUI with a Phoenix site. I’m not sure if this is useful to anyone, but if you add daisyUI and set
styledtofalse, it will remove all of daisy’s design decisions and leave the site with the default reset-CSS Tailwind.Then it looks like you can create your own CSS classes with raw CSS or
@applyin the main CSS file. From this comment it sounds like using Tailwind’s@layerdirective will automatically purge unused styles.The end result is that I didn’t have to remove Tailwind, but it looks like I can use named classes and write normal CSS with it. I’m going to try using their components first, because it seems like a halfway point between Tailwind and something like Bootstrap.
jss
I am really not that fond of Tailwind, unless I am building a very simple site.