aswinmohanme
Has anyone figured out how to style Emails with TailwindCSS on Phoenix 1.6?
I am currently sending text-based emails but would like to send proper brand based emails with Phoenix. I already have TailwindCSS setup, but would like to style my emails using the same.
Has anyone figured out how to do this? Or if that’s such a bad idea, what alternatives do you use ?
Most Liked
outlog
html emails is a very fine art (you need to support 90+ clients and inline styles etc etc)..
I suggest using mjml https://mjml.io - elixir library: GitHub - adoptoposs/mjml_nif: Elixir NIF bindings for the MJML Rust implementation (mrml) · GitHub
edit: there seems to be https://maizzle.com for tailwind emails - mjml is certainly the tested and trusted way - no idea if maizzle works..
outlog
Maizzle doesn’t include markup abstractions that expand to table-based structures, such as
<row>or<column>in other frameworks.You code your emails the way you want to with HTML you already know, there’s no need to learn new tags or attributes.
Knowing that some email clients still need layouts coded with tables in order to ensure proper rendering, this might sound terrifying to some. However, depending on your audience, nowadays you can actually use modern HTML and CSS and have your layout look great in the majority of email clients.
What is Maizzle? - Getting Started / Maizzle
majority of email clients - so maizzle is not useable if you want html emails that “just work”.. so I would recommend going with mjml: Crafting Beautiful Emails in Elixir Using MJML-Alex Koutmos | Engineering Blog
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









