<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="381388" data-post-id="381388">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="theoldguy" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  theoldguy
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>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.</p>
<p>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.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="381388" data-batch-url="/posts/batch_likers">
                        5
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/anyone-not-using-tailwind-in-a-phoenix-project/72401/82">Post #81</a>
	                </div>
	            </div>
              <div id="likers-container-381388" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="381388"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #81"></div>
  </section>
</div>
    <div class="postbit" id="381538" data-post-id="381538">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="matt-savvy" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  matt-savvy
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>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.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="381538" data-batch-url="/posts/batch_likers">
                        3
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/anyone-not-using-tailwind-in-a-phoenix-project/72401/83">Post #82</a>
	                </div>
	            </div>
              <div id="likers-container-381538" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="381538"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #82"></div>
  </section>
</div>
    <div class="postbit" id="381847" data-post-id="381847">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="thomasbrus" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/thomasbrus/120/40196_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  thomasbrus
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<blockquote>
<p>plain CSS and Sass</p>
</blockquote>
<p>When I read this I always wonder…</p>
<ul>
<li>how do you set up your token system (colors, font sizes, spacing)?</li>
<li>hand picked colors?</li>
<li>do you call a light gray <code>$light-gray</code>, <code>$color-light-gray</code>, or <code>$color-gray-400</code>. And so on.</li>
<li>CSS naming conventions for class names? BEM?</li>
<li>what about one-off styles, for example <code>.text-right</code>, <code>max-sm:hidden</code>? Do you have a utilities.sass file?</li>
<li>maintenance cost and changing your mind later</li>
<li>how do you document all these choices?</li>
</ul>
<p>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 <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p>
<p>I agree about keeping HTML readable btw <img src="https://forum.elixirforum.com/images/emoji/apple/grinning_face_with_smiling_eyes.png?v=15" title=":grinning_face_with_smiling_eyes:" class="emoji" alt=":grinning_face_with_smiling_eyes:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="381847" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/anyone-not-using-tailwind-in-a-phoenix-project/72401/84">Post #83</a>
	                </div>
	            </div>
              <div id="likers-container-381847" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="381847"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #83"></div>
  </section>
</div>
    <div class="postbit" id="381855" data-post-id="381855">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Schultzer" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Schultzer/120/4339_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Schultzer
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Here is a good resource <a href="https://moderncss.dev/" rel="noopener nofollow ugc">https://moderncss.dev/</a></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="381855" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/anyone-not-using-tailwind-in-a-phoenix-project/72401/85">Post #84</a>
	                </div>
	            </div>
              <div id="likers-container-381855" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="381855"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #84"></div>
  </section>
</div>
    <div class="postbit" id="381859" data-post-id="381859">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="eahanson" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/eahanson/120/20895_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  eahanson
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="thomasbrus" data-post="84" data-topic="72401">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/thomasbrus/48/40196_2.png" class="avatar"> thomasbrus:</div>
<blockquote>
<ul>
<li>how do you set up your token system (colors, font sizes, spacing)?</li>
</ul>
</blockquote>
</aside>
<p>SASS/SCSS variables</p>
<aside class="quote no-group" data-username="thomasbrus" data-post="84" data-topic="72401">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/thomasbrus/48/40196_2.png" class="avatar"> thomasbrus:</div>
<blockquote>
<ul>
<li>hand picked colors?</li>
</ul>
</blockquote>
</aside>
<p>Usually I find a palette that I like. For no-nonsense apps I usually take the colors from <a href="https://tabler.io/admin-template/preview" rel="noopener nofollow ugc">Tabler</a>.</p>
<aside class="quote no-group" data-username="thomasbrus" data-post="84" data-topic="72401">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/thomasbrus/48/40196_2.png" class="avatar"> thomasbrus:</div>
<blockquote>
<ul>
<li>do you call a light gray <code>$light-gray</code>, <code>$color-light-gray</code>, or <code>$color-gray-400</code>. And so on.</li>
</ul>
</blockquote>
</aside>
<p>My “public” variables are semantic, like: <code>$control-color--contents--fg</code> , <code>$control-color--contents--bg</code> etc., but they are defined using some “private” variables like <code>$-blue</code>, <code>$-blue-lt</code>, <code>$-blue-dk</code> etc.</p>
<aside class="quote no-group" data-username="thomasbrus" data-post="84" data-topic="72401">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/thomasbrus/48/40196_2.png" class="avatar"> thomasbrus:</div>
<blockquote>
<ul>
<li>CSS naming conventions for class names? BEM?</li>
</ul>
</blockquote>
</aside>
<p>I separate words with <code>--</code> and prefix some classes with one-character prefixes like <code>c</code> for component and <code>p</code> for page. So <code>c-control--button--xl</code> for an extra-large button. My button component (in <code>Web.Components.Control.button</code>) has a <code>size</code> attr and the component sets the class like <code>&lt;a class={"c-control--button--#{@size}"}&gt;</code>. 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.</p>
<aside class="quote no-group" data-username="thomasbrus" data-post="84" data-topic="72401">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/thomasbrus/48/40196_2.png" class="avatar"> thomasbrus:</div>
<blockquote>
<ul>
<li>what about one-off styles, for example <code>.text-right</code>, <code>max-sm:hidden</code>? Do you have a utilities.sass file?</li>
</ul>
</blockquote>
</aside>
<p>I never use utility classes. (Unless I’m using Tailwind or its predecessors, which I personally prefer not to do.)</p>
<aside class="quote no-group" data-username="thomasbrus" data-post="84" data-topic="72401">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/thomasbrus/48/40196_2.png" class="avatar"> thomasbrus:</div>
<blockquote>
<ul>
<li>maintenance cost and changing your mind later</li>
</ul>
</blockquote>
</aside>
<p>I personally find it easier to edit SASS/SCSS than to edit a long list of utility class names.</p>
<aside class="quote no-group" data-username="thomasbrus" data-post="84" data-topic="72401">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/thomasbrus/48/40196_2.png" class="avatar"> thomasbrus:</div>
<blockquote>
<ul>
<li>how do you document all these choices?</li>
</ul>
</blockquote>
</aside>
<p>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.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="381859" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/anyone-not-using-tailwind-in-a-phoenix-project/72401/86">Post #85</a>
	                </div>
	            </div>
              <div id="likers-container-381859" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="381859"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #85"></div>
  </section>
</div>
    <div class="postbit" id="381861" data-post-id="381861">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="egeersoz" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/egeersoz/120/15704_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  egeersoz
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>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.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="381861" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/anyone-not-using-tailwind-in-a-phoenix-project/72401/87">Post #86</a>
	                </div>
	            </div>
              <div id="likers-container-381861" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="381861"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #86"></div>
  </section>
</div>
    <div class="postbit" id="381871" data-post-id="381871">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="woylie" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/woylie/120/38856_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  woylie
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<ul>
<li>tokens defined with <a href="https://styledictionary.com/" rel="noopener nofollow ugc">Style Dictionary</a>, exported to any needed format</li>
<li>map SASS variables (or mixins/functions depending on the use case) to CSS custom properties (allows you to spot the use of undefined custom properties at build time)</li>
<li>tokens use <a href="https://styledictionary.com/info/tokens/#category--type--item" rel="noopener nofollow ugc">CTI naming</a></li>
<li>for colors, differentiate between base tokens (color-gray-400), semantic tokens (color-background-secondary; reference base tokens) and component tokens (color-button-background-primary-hover); see also <a href="https://www.designtokens.org/tr/2025.10/color/#token-naming" rel="noopener nofollow ugc">Token naming section</a> of the Design Token Color module</li>
<li>base color palettes can be generated or handpicked, but that’s up to the designer; I might do either for side projects</li>
<li>also check the <a href="https://www.designtokens.org/tr/2025.10/format/" rel="noopener nofollow ugc">Design Token Format module</a></li>
<li>utility classes generated from tokens</li>
<li>CSS classes
<ul>
<li>component classes: just the component name (e.g. `.box`)</li>
<li>component sub classes: always prefixed with the component name (e.g. `.box-body`)</li>
<li>modifier classes: `is-something`, `has-something`; CSS selectors must include component class (e.g. `.box.is-something {}` instead of just `.is-something {}`)</li>
<li>utility classes: {attribute}-{value} (e.g. `weight-medium`, `.bg-primary-normal`; value normally based on token names)</li>
<li>in practice, every component gets its own file, and everything is nested within the component class (`.box { &gt; .box-header { &amp;.is-cute {} }}`); stylelint ensures that certain attributes must be set via variables or functions (e.g. no hex colors, only color tokens)</li>
</ul>
</li>
<li>maintenance cost and changing your mind later: all good, not sure what to say; SCSS is stable; in the end, you still write CSS with some niceties, so it would be trivial to refactor; the class conventions above are enough to prevent component styles from bleeding</li>
<li>technical side documented in the corresponding SCSS modules</li>
<li>token/color overview generated from Style Dictionary JSON output, rendered in Phoenix Storybook page</li>
</ul>
<p>Tailwind does a lot of things that have already been figured out elsewhere, true <img src="https://forum.elixirforum.com/images/emoji/apple/smiley.png?v=15" title=":smiley:" class="emoji" alt=":smiley:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="381871" data-batch-url="/posts/batch_likers">
                        8
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/anyone-not-using-tailwind-in-a-phoenix-project/72401/88">Post #87</a>
	                </div>
	            </div>
              <div id="likers-container-381871" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="381871"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #87"></div>
  </section>
</div>
    <div class="postbit" id="382424" data-post-id="382424">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="theoldguy" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  theoldguy
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>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.</p>
<p>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.</p>
<p>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.</p>
<p>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.</p>
<p>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.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="382424" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/anyone-not-using-tailwind-in-a-phoenix-project/72401/89">Post #88</a>
	                </div>
	            </div>
              <div id="likers-container-382424" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="382424"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>