RicoTrevisan

RicoTrevisan

Advanced Tailwind tricks inspired by Shadcn

These tips just solved a big problem for me, figured I would share it here:

I was struggling to make this work:

~H"""
	<div class={"ml-[#{@level / 2}rem]"} </div>
"""

But this worked:

~H"""
	<div 
		class="ml-[--left-margin]" 
		style={"--left-margin: #{@level / 2}rem"}>
	</div>
"""

Most Liked

slouchpie

slouchpie

This CSS var solution to dynamic sizing is super helpful. Thanks!

Where Next?

Popular in Screencasts Top

New
blackode
This video is about the step by step guide to build packages with clear explanation of package files and registration procees to hex.pm ...
New
knewter
We produced five weeks of free content introducing people to Elixir and the basics of OTP, Ecto, and Phoenix. Today we’re announcing that...
New
ElixirCasts
I made an episode where we use escript to make a Rock-Paper-Scissors we can play from the command line. https://elixircasts.io/command-l...
New
omgneering
I made the next video in the OTP series to help get started with Supervisor methods and syntax. The video goes over the init methods lik...
New
ityonemo
Hey all! Following the fantastic blog post by the erlang team (A brief introduction to BEAM - Erlang/OTP) I made a video that quickly d...
New
alvises
The Beauty of Pattern Matching in Elixir (Screencast + Transcript) One of the reasons I fell in :heart: with Elixir is pattern matchin...
New
lawik
Hey everyone, we thought it was about time we had an official streamers thread. Please feel free to add yours in this post (it’s a wiki) ...
New
adkron
I was working on testing a named agent that was started by my application. In testing I had intermittent failures. I thought I would shar...
New
whatyouhide
Hey friends, today I published the first video of a new series I’m making, where I solve the challenges on Protohackers (see my tweet ann...
New

Other popular topics Top

danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 29377 241
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID&lt;0.412.0&gt; terminating ** (Postgrex.Error) FATAL...
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
jaysoifer
Is there a way to rollback a specific migration and only that one (“skipping” all the other ones)? Would mix ecto.rollback -v 200809061...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
boundedvariable
I am going through the kafka architecture. All the features what the kafka is providing are already in Erlang. I would like hear your opi...
New
klo
Got a question about when to concat vs. prepending items to list then reversing to achieve appending. So i know lists boil down to [1 | ...
New

We're in Beta

About us Mission Statement