Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tailwind CSS #94

Closed
3 tasks done
nelsonic opened this issue Jun 6, 2022 · 11 comments
Closed
3 tasks done

Tailwind CSS #94

nelsonic opened this issue Jun 6, 2022 · 11 comments
Assignees
Labels
discuss Share your constructive thoughts on how to make progress with this issue enhancement New feature or enhancement of existing functionality priority-2 Second highest priority, should be worked on as soon as the Priority-1 issues are finished T1d Time Estimate 1 Day technical A technical issue that requires understanding of the code, infrastructure or dependencies

Comments

@nelsonic
Copy link
Member

nelsonic commented Jun 6, 2022

As noted by @SimonLab in #74 Tailwind is similar to Tachyons 😍
However it appears to have more traction, some might say it has a tailwind propelling it ... 🌬️

https://tailwindcss.com/
image

My reading of the Tailwind landing page is that it doesn't offer much new over Tachyons, 🤷‍♂️
but the packaging seems far more polished ... 💄

From Chris' recent post: https://fly.io/phoenix-files/tailwind-standalone/ [ 2021-12-22 ]
It's clear that Tailwind will be included as the default CSS Framework in Phoenix quite soon: 🔜
image

https://github.com/phoenixframework/tailwind

Since v1.4 all Phoenix Apps include the Milligram CSS Framework https://milligram.io
e.g: assets/css/phoenix.css
all of our v1.6.x Apps have it ... and it's been a pain to override with Tachyons! 🙄

It appears as though Milligram hasn't been updated in a while ... https://github.com/milligram/milligram
image

Pull Requests ignored: https://github.com/milligram/milligram/pulls
image

The creator of Milligram appears to be taking a break from GitHub: https://github.com/cjpatoilo
image

Makes perfect sense. There's (a lot) more to life than GitHub/Code. ☀️

Anyway, back to Tailwind.
The writing is on the wall: Phoenix will include it (prob v.1.7+) so we should consider adopting it. 💭

Overview

https://tailwindcss.com/docs/utility-first
image

Context

https://podcast.thinkingelixir.com/21
image

https://changelog.com/jsparty/155
image

Note: skip the first 4 mins of "sponsors" and intros to the actual interview. Play at 1.5x Speed.

Tailwind UI looks good but has restrictive license: https://tailwindui.com/license

"In simple terms, use Tailwind UI for anything you like as long as it doesn't compete with Tailwind UI."

"Creating an admin panel tool (like Laravel Nova or ActiveAdmin) that is made available either for sale or for free"

DaisyUI appears to be a viable MIT license alternative: https://github.com/saadeghi/daisyui

Todo

  • Read the docs and see how it differs / improves upon the utility class model in Tachyons.
    (is it just packaging/presentation or something genuinely different/better...?)
  • Try it in a sample project e.g. one of the recent Demo apps: Advanced Example > RT Colab gitea-demo#12

See: https://pragmaticstudio.com/tutorials/adding-tailwind-css-to-phoenix

  • Evaluate if the Hype is justified and we should just learn+use it!
@nelsonic nelsonic added enhancement New feature or enhancement of existing functionality discuss Share your constructive thoughts on how to make progress with this issue technical A technical issue that requires understanding of the code, infrastructure or dependencies labels Jun 6, 2022
@nelsonic nelsonic added the priority-2 Second highest priority, should be worked on as soon as the Priority-1 issues are finished label Jun 6, 2022
@nelsonic nelsonic mentioned this issue Jun 6, 2022
7 tasks
@nelsonic
Copy link
Member Author

Going to track our learning in: https://github.com/dwyl/learn-tailwind

@nelsonic
Copy link
Member Author

Official instructions: https://tailwindcss.com/docs/guides/phoenix

@nelsonic
Copy link
Member Author

Just reading through https://tailwindcss.com/docs/customizing-colors ...
While I'm not a fan of needing to have JS to "process" the CSS file,
I can certainly see the power of this approach.
And with esbuild handing the build + live reload it's a reasonable workflow. 💭

@nelsonic
Copy link
Member Author

Intro logo:
tailwind-css-logo

nelsonic added a commit to dwyl/learn-tailwind that referenced this issue Jun 18, 2022
@nelsonic
Copy link
Member Author

tailwind-play-color-change

@nelsonic
Copy link
Member Author

FYI: I'm deep-diving into understanding how the internals of Tailwind work
and how we can use it for our project(s)
so that I grok it well enough to write a tutorial that will be useful to other people.

I know I'm definitely doing more work on this up-front than I strictly need to. ⏳
But as with all our other tutorials, examples & demos, I know that:

a) it will be immediately beneficial to me to have a good understanding.
b) we will point new-joiners to the doc and encourage them to extend/update it as part of their learning
c) making it generally useful to anyone means we make something that other people can contribute to. That makes everyones' lives better.
d) I will refer back to it in the future when I need a refresher.

Going to try and wrap up my "first pass" on this today and hand-over to @SimonLab for review+improvements. 🤞

@nelsonic nelsonic added in-progress An issue or pull request that is being worked on by the assigned person T1d Time Estimate 1 Day labels Jun 21, 2022
@nelsonic
Copy link
Member Author

@nelsonic
Copy link
Member Author

admin-dashboard-example

@nelsonic
Copy link
Member Author

image

nelsonic added a commit to dwyl/learn-tailwind that referenced this issue Jun 21, 2022
nelsonic added a commit to dwyl/learn-tailwind that referenced this issue Jun 21, 2022
@nelsonic
Copy link
Member Author

https://github.com/dwyl/learn-tailwind already in decent state. 😜

@nelsonic nelsonic removed the in-progress An issue or pull request that is being worked on by the assigned person label Jun 21, 2022
@nelsonic
Copy link
Member Author

Included in #80 as part of updating the core stack to PETAL #87

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Share your constructive thoughts on how to make progress with this issue enhancement New feature or enhancement of existing functionality priority-2 Second highest priority, should be worked on as soon as the Priority-1 issues are finished T1d Time Estimate 1 Day technical A technical issue that requires understanding of the code, infrastructure or dependencies
Projects
None yet
Development

No branches or pull requests

2 participants