Tailwind CSS WIth SvelteKit Setup

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 ก.ย. 2024

ความคิดเห็น • 28

  • @JoyofCodeDev
    @JoyofCodeDev  ปีที่แล้ว +8

    I forgot to mention it but there's even an easier way to set up Tailwind CSS in Svelte with `npx svelte-add tailwindcss`. 🔥

  • @mr.namazu1023
    @mr.namazu1023 ปีที่แล้ว +2

    A little addon i can recommend for Tailwind is "Inline Fold". It collapses the class section in a document to 3 little dots and open it if u click in it. You can also bind a keybind to fold and unfold it.. makes everything waaay more readable!

    • @JoyofCodeDev
      @JoyofCodeDev  ปีที่แล้ว +3

      That's awesome! 😄

    • @eugenereim456
      @eugenereim456 8 หลายเดือนก่อน

      You can make vanilla classes with tailwind too. Just use @apply in css. It's also keeps your html file clean.
      Example:
      .hero {
      @apply bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4
      }
      I don't know why people doesn't use that feature and always says that Tailwind create mess in html file. 😐

  • @daleweaver777
    @daleweaver777 ปีที่แล้ว +6

    Thanks for the great tutorial! Just FYI, the next release of Tailwinds Prettier plugin will no longer bundle the Svelte plugin. Checkout PR 90 in their repo.

    • @JoyofCodeDev
      @JoyofCodeDev  ปีที่แล้ว +1

      Thank you for the heads up!

  • @annismonadjem6901
    @annismonadjem6901 ปีที่แล้ว +2

    Thank you.

  • @aldyreal
    @aldyreal ปีที่แล้ว +1

    Thanks for the tutorial!
    If you watched this tutorial already, I would recommend using svelte-add for your next project to add tailwind with ease.

  • @fulldork
    @fulldork ปีที่แล้ว +3

    Thank you! I wanted to use tailwind in my Svelte but the documentation was so confusing. Much appreciated

  • @x3vi290
    @x3vi290 11 หลายเดือนก่อน +1

    Maybe someone runs into the same problem with the tailwind autoformatting - i needed to add
    "plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
    in the .prettierrc to make it work and had to leave prettier-plugin-svelte installed. Took me quite a while, enjoy...! :D

  • @abiodundacosta6250
    @abiodundacosta6250 ปีที่แล้ว +1

    nice!😃

  • @ninoverstraeten442
    @ninoverstraeten442 ปีที่แล้ว +1

    Should I watch the Sveltekit for beginners tutorial and the migration one or wait for an updated video?

    • @JoyofCodeDev
      @JoyofCodeDev  ปีที่แล้ว +2

      Wait for the update! 😄

  • @guilhermecosta6731
    @guilhermecosta6731 ปีที่แล้ว +1

    So nice! Btw, what is this zsh(?) plugin that shows the node version?

    • @JoyofCodeDev
      @JoyofCodeDev  ปีที่แล้ว

      I use github.com/zsh-users/zsh-autosuggestions

  • @theinanish
    @theinanish ปีที่แล้ว

    Hey the prettier autoformat doesn't work now. Do you know why?

    • @JoyofCodeDev
      @JoyofCodeDev  ปีที่แล้ว

      I'm sorry I haven't updated the post yet but you can follow these instructions: github.com/tailwindlabs/prettier-plugin-tailwindcss.

  • @theIbraDev
    @theIbraDev ปีที่แล้ว

    Doesn't work for me :D

    • @JoyofCodeDev
      @JoyofCodeDev  ปีที่แล้ว +1

      They changed how it works! I would read github.com/tailwindlabs/prettier-plugin-tailwindcss.

    • @theIbraDev
      @theIbraDev ปีที่แล้ว

      @@JoyofCodeDev forgot to post an edit, just doing «npm i -D prettier-plugin-tailwindcss» worked 😅

  • @ray-lee
    @ray-lee ปีที่แล้ว

    not working for me

    • @JoyofCodeDev
      @JoyofCodeDev  ปีที่แล้ว

      They changed how the plugin works recently - I'm going to update the post but you can read the instructions at github.com/tailwindlabs/prettier-plugin-tailwindcss.

    • @theIbraDev
      @theIbraDev ปีที่แล้ว

      @@JoyofCodeDev did you update the post? :p

    • @JoyofCodeDev
      @JoyofCodeDev  ปีที่แล้ว +1

      @@theIbraDev Not yet! 😄

  • @CodingCanal
    @CodingCanal 5 หลายเดือนก่อน

    update as of March 27th 2024: I was able to leave in the prettier-plugin-svelte and then had this in my prettierrc - "plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"]