AstonJ
Curious whether there’s anyone here not using Tailwind - if you’re not, what are you using instead and was there any specific reason why you decided against Tailwind?
Trending in Discussions
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
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New
Hi there! :wave:
@frigidcode and I (but mostly him) have been running an Elixir Book club, we’re almost done with Designing Elixir Syste...
New
I’ve been using Emacs as my main code editor for more than a two years. It’s a custom build version although I’ve tried doom emacs and sp...
New
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with.
But I don’t use it anymore.
Serverless was the promis...
New
Lately I’ve been thinking about how to organize components as a LiveView application grows. One of the pain points I’ve found (for myself...
New
What IDE or editor are you using for Elixir development?
Personally, I use Zed, and I really like it, but sometimes I wish there were a ...
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
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
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly)
AI dream has many faces, but general...
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
- #ai
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixirconf-us
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #security
- #metaprogramming










Showing Posts 88 to 79- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
theoldguy
There are two main approaches when working with styles. The first is designing directly in HTML, which is primarily used for quick prototyping. This involves using the style=“” attribute. Tailwind CSS is an extension of this approach.
The second approach is “design-first.” Using Sass (or a similar preprocessor) is very helpful here. You begin by writing a _variables.scss file, typically between 50-100 lines. It is best to define colors, etc semantically, such as $color-primary, rather than literally, like $color-gray. This allows you to change your entire color palette with minimal effort.
You will also create a _main.scss file for global styles and can start with something like _detail-page.scss for page-specific styling. When following a mobile-first methodology, you write the desktop styles directly within the same class, using media queries.
Ultimately, you’ll have around 10–20 style files, each approximately 50–100 lines. By using a tool like a monorepo alongside a development server such as Vite—which is perfect for this—you can design and test several sites with live reloading, all sharing a central design system.
Your template will then be robust and maintainable for 5–10 years with only minor updates. For each component, you’ll typically work with no more than 10 classes to consider. In projects with multiple developers, this approach makes it extremely straightforward to identify and correct any inconsistencies in design implementation.
woylie
Tailwind does a lot of things that have already been figured out elsewhere, true
egeersoz
AI is really good at these types of refactors because it can knock out the tedious and repetitive parts quite reliably. We just did a complete front end redesign (150k lines of Vue.js) using Opus 4.5. What would otherwise have taken us weeks took just three days, and that was mostly watching the AI work and then verifying the results.
eahanson
SASS/SCSS variables
Usually I find a palette that I like. For no-nonsense apps I usually take the colors from Tabler.
My “public” variables are semantic, like:
$control-color--contents--fg,$control-color--contents--bgetc., but they are defined using some “private” variables like$-blue,$-blue-lt,$-blue-dketc.I separate words with
--and prefix some classes with one-character prefixes likecfor component andpfor page. Soc-control--button--xlfor an extra-large button. My button component (inWeb.Components.Control.button) has asizeattr and the component sets the class like<a class={"c-control--button--#{@size}"}>. I could theoretically automatically generate the class names based on the component and function name, but I haven’t found the need to do that yet.I never use utility classes. (Unless I’m using Tailwind or its predecessors, which I personally prefer not to do.)
I personally find it easier to edit SASS/SCSS than to edit a long list of utility class names.
I create a styleguide (which I think other people call a “storybook”?) that contains each component and its docs, as well as various examples. When I want to make a change to a component, I often view the changes in the styleguide so that I don’t forget to create examples of the various features of a component (kind of like test-driven development for components, except that there’s no automated feedback). The styleguide is just a single LiveView that has some navigation links to jump between components.
Schultzer
Here is a good resource https://moderncss.dev/
thomasbrus
When I read this I always wonder…
$light-gray,$color-light-gray, or$color-gray-400. And so on..text-right,max-sm:hidden? Do you have a utilities.sass file?It feels to me you would end up doing a lot of the same things that Tailwind has already figured out. Or am I missing something, do tell let me know of course
I agree about keeping HTML readable btw
matt-savvy
The good news is that you don’t need to use Tailwind with Phoenix! Let’s not throw the baby out with the bathwater here.
theoldguy
My own comfort zone is with plain CSS and Sass. I find their logic simple and the separation of concerns keeps my HTML tags shining and readable.
The component-focused paradigm just clicks for me. This preference is actually why I haven’t picked up Phoenix Framework in years, as its Tailwind integration doesn’t align with my style.
pepicrft
If you need a component kit native to Phoenix LiveView you can check out our build system Noora: Open sourcing Noora for the web
You can also see it live in our project at https://tuist.dev/tuist/tuist
@cschmatzler did and amazing job putting it together, and we are actively maintaining it and bringing new components regularly.
thomasbrus
I think the argument regarding the utility class soup is also about:
It was like this in an earlier version of petal components but they switched to proper class names (I think also to make theming easier): petal_components/lib/petal_components/button.ex at v0.19.7 · petalframework/petal_components · GitHub