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

sadjow
Ben Awad posted a youtube video about a project he created with Phoenix LiveView:
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
New
calebjosue
I’ve made a video about installing Elixir 1.16.1 on WIndows 11. In case someone is interested here’s the link The video de...
New
ElixirCasts
I made an screencast that looks at Sobelow, a project that scans Phoenix applications for security issues. If you haven’t used Sobelow be...
New
ElixirCasts
Made a video about introspecting Ecto Schemas. https://elixircasts.io/introspecting-ecto-schemas Posted via Devtalk (see this thread ...
New
remzolotykh
Hi all. I’m new here and kinda new to Elixir and Phoenix, but I love it so much. These days PETAL stack is my favourite way to build apps...
New
sevensidedmarble
Hey yall, I made a video about doing magic links in phoenix: It’s a run-through of a GH repo I made to serve as a referen...
New
ElixirCasts
I made a video on using the job processing library.
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

Other popular topics Top

shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 30048 115
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
_russellb
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lis...
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

We're in Beta

About us Mission Statement