Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Adrian 5 posts 75 karma points
    Nov 14, 2022 @ 12:38
    Adrian
    0

    Tailwind / Umbraco

    Hi!

    I just started using Umbraco and it feels really great so far.

    I would really like to use Tailwind CSS but I can't really get it going. I've tried something called Chime Starter Kit - but it doesn't seem to work.

    Can anyone kindly guide me on how to get Tailwind going in Umbraco? I'm using Umbraco v. 10.3.2

    Cheers in advance! Adrian

  • Søren Kottal 713 posts 4571 karma points MVP 6x c-trib
    Nov 15, 2022 @ 10:19
    Søren Kottal
    1

    I love Tailwind!

    I install it in the root of my project, and then I add a tailwind.config.js and a main.css file in /UI/CSS (thats just how I like to organize it).

    In my tailwind config, I set the content value to "./Views/*/.cshtml", and then I add a script in my package.json file for building the css.

    cross-env NODE_ENV=production && npx tailwindcss -i ./UI/CSS/main.css -o ./wwwroot/css/main.css -c ./UI/CSS/tailwind.config.js --minify

    I also have a watch script for development

    npx tailwindcss -i ./UI/CSS/main.sss -o ./wwwroot/css/main.css -c ./UI/CSS/tailwind.config.js --watch --minify

  • Allan Strange 3 posts 72 karma points
    Nov 16, 2022 @ 11:21
    Allan Strange
    0

    Hello Søren,

    Can you guide me to how you get an Umbraco project with Tailwind in Visual Studio code?

    I would like to try this combo out :-)

  • Søren Kottal 713 posts 4571 karma points MVP 6x c-trib
    Nov 17, 2022 @ 08:54
    Søren Kottal
    0

    Hi Allan

    Follow the steps above - if you have any questions, just ask them here...

  • Adrian 5 posts 75 karma points
    Nov 17, 2022 @ 12:52
    Adrian
    0

    Like this? Screenshot

    What command do you use to run the script? Npx run build, npm run build? None of them are working and I don't know why. :)

    Cheers!

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies