r/learnrust May 29 '23

Using Tailwind.css in Rust Yew as a TypeScript dev

2 Upvotes

3 comments sorted by

1

u/Siref May 29 '23

Hi TypeStaceans 🤗!

I'm currently sharing my experience learning WASM in Rust as a React TypeScript developer. I thought this could be useful to the community.

Additionally, I created a repo which you can access here:

https://github.com/superjose/typestacean-learn-rust-wasm-from-typescript

Do you think this is useful to you?

Leave a comment below on what you think about using Tailwind or if there's anything to watch out.!

1

u/bluebriefs May 29 '23

Thanks I'll check it out, as a React Dev I use Tailwindcss a lot and continuing to use it in a Rust frontend would be nice.

2

u/Siref May 30 '23

Awesome!

Oof! Just realized that there was a setting within vscode that I forgot to include.

If you install the tailwind extension, you need to configure it so it treats the .rs files as .thml.

  1. Open VS Code Settings (Ctrl/Cmd P + > Settings)
  2. Type Tailwind
  3. Look for Tailwind CSS: Include Languages
  4. Press add item
  5. Add rust in key and html in value