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

Support Tailwind CSS #100

Closed
nvh95 opened this issue May 3, 2022 · 4 comments · Fixed by #133
Closed

Support Tailwind CSS #100

nvh95 opened this issue May 3, 2022 · 4 comments · Fixed by #133
Labels
feature request Request a new feature future work needed Merged PR or Closed Issue but need to visit in the future

Comments

@nvh95
Copy link
Owner

nvh95 commented May 3, 2022

Is your feature request related to a problem? Please describe.
Tailwind CSS is an excellent library to write utility CSS

Describe the solution you'd like
Jest Preview should support Tailwind CSS out of the box. We should also provide an example as well.

Describe how should jest-preview implements this feature
Not sure. As I know, Tailwind CSS is usually configured through a PostCSS plugin. Let's follow that route.

Additional context
I'm not sure Jest Preview supports Tailwind CSS yet or not. 😂

@nvh95 nvh95 added the feature request Request a new feature label May 3, 2022
@nvh95
Copy link
Owner Author

nvh95 commented May 19, 2022

Documentation on how to install TailwindCSS: https://tailwindcss.com/docs/installation

How tailwindcss work? Mainly 2 ways:

  • Build an output CSS file (using Tailwind CLI) => Can use jestPreviewConfigure externalCss
  • import css file Using PostCSS => Not sure how to do. But I know that we have to handle
@tailwind base;
@tailwind components;
@tailwind utilities;

I don't know what kind of @tailwind syntax is (directive?), but we might have to handle it via Code transformation, or/and TailwindCSS CLi

@sundaycrafts
Copy link
Contributor

sundaycrafts commented May 27, 2022

@nvh95 Hi, here is my random implementation.

sundaycrafts@e77ded7

Currently, this only support documented installation process for Tailwind CSS. It means it doesn't look up postcss.config.js. But it doesn’t be needed for Tailwind CSS itself.

I think this implementation is enough for the first step to support Tailwind CSS. What do you think?

@nvh95
Copy link
Owner Author

nvh95 commented May 27, 2022

@sundaycrafts Thank you very much for your interest to Jest Preview and your efforts to make it work with TailwindCSS. I will take a look at your experiment as soon as I have free time.

In the mean time, can you open a PR, even when it's not been done yet? Please open as a draft PR, so I can easier review your code, and you can officially claim this issue, avoid others also plan to work on this.

Thanks.

@nvh95 nvh95 linked a pull request May 29, 2022 that will close this issue
1 task
@nvh95 nvh95 added this to the 0.2.6 milestone Jun 29, 2022
@nvh95 nvh95 removed this from the 0.2.6 milestone Jul 2, 2022
@nvh95
Copy link
Owner Author

nvh95 commented Jul 19, 2022

Close for now since it is included in #133
@nvh95 to check if classes with : work fine (e.g: :hover)

@nvh95 nvh95 closed this as completed Jul 19, 2022
@nvh95 nvh95 added the future work needed Merged PR or Closed Issue but need to visit in the future label Jul 19, 2022
@nvh95 nvh95 mentioned this issue Aug 18, 2022
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request a new feature future work needed Merged PR or Closed Issue but need to visit in the future
Projects
None yet
2 participants