Greetings Everyone!!!
A little bit of my background so it could be easier to understand where my comments are coming from, and to take them with a grain of salt…or lots of.
Background
I started coding back in 1989. A few years later I was writing code with VIM in Unix: FoxBase+ and C. So, I am very used to code on a simple and fun programming language, and in a not so fun but powerful language, hence, I am used to allocate memory when needed and freeing it when no longer needed, and yes, I still use Short integers when available: The very first computer I used had 128Kb of RAM, the Tandy Color Computer 3. Some habits are hard to break, and I really want my programs to be thin and light. I am barely starting with Elixir, Phoenix, LiveView, HTML and CSS, thus… I really see no point on using Tailwind. I started using Linux in the mid '90s because I love the freedom it provides, so I totally agree that everybody is free to choose if they want to use certain tool, or not. Everybody is free to chose their poison. No questions asked (my VERY PERSONAL point of view).
Suggestion
Could it be possible to have mix to create code like this:
# === core_components.ex ===
def modal(assigns) do
~H"""
<div
[...]
# WITH Tailwind (Hard-coded styles, I guess)
class="relative z-50 hidden"
# WITHOUT Tailwind
class="sample_modal"
# === priv/static/assets/app.css ===
/* Created on the fly WITH Tailwind */
.relative{
position: relative;
}
.z-50{
z-index: 50;
}
.hidden{
display: none;
}
/* Hard-coded WITHOUT Tailwind */
.sample_modal {
position: relative;
z-index: 50;
display: none;
}
Explanation
As of now, it seems like I am being punished for not using Tailwind.
I have a few plain text lines above my form when the put_flash is invoked (:info, or :error) because there are no styles at all, and I have no clue about what styles to use to have those lines to show up as Green/Red pop-ups with CSS.
Either, 1) I will have to study what all those Tailwind classes to know what CSS they are using in order to replicate the basic behavior, or 2) I will have to create another project using Tailwind to get all those classes and then gather the CSS needed to achieve the basic behavior.
Both cases, as I mentioned before, seem like I am being punished for not using Tailwind. As far as I understand the parameter is --no-tailwind
, not --no-css
.
Best regards,
Greg