TailwindCSS Is Ugly. Here's How To Deal With It.

Поделиться
HTML-код
  • Опубликовано: 28 дек 2024

Комментарии • 24

  • @gamingwolf3385
    @gamingwolf3385 6 месяцев назад +5

    5:40 you can also use tailwind-merge with clsx for conditional styles ,
    Its a good combo

  • @bioburden
    @bioburden 5 месяцев назад +1

    Thanks for quickly explaining cva, I was struggling to know the best way of implementing a design system with Tailwind.

  • @blu_ey
    @blu_ey 6 месяцев назад +2

    I use tailwind-variants instead of cva, it has slots and automatically uses twMerge

  • @nested9301
    @nested9301 6 месяцев назад +6

    I always turn everything into separate components it's the core of react

    • @smoothoperatah
      @smoothoperatah 6 месяцев назад +1

      always? everything? that sounds tedious

    • @treyrader
      @treyrader 6 месяцев назад

      Only do that if you find yourself needing to reuse the div. I use tw merge and clsx and thn wrap things in the cn() function divided by commas. (eg 'cn("flex", "items-center", "justify-center", {"hidden": !isActive});'. I also use the layer directive and add all my combo classnames, such as "flex-center": "flex items-center justify-center"; It goes a longg way. Used to store the classnames in a separate module but it proved to be difficult to make modifications nor did i get the intellisense.
      I fucking love tailwind so much

  • @sheldonfrith8258
    @sheldonfrith8258 Месяц назад

    Good video, Audio is quite hard to hear though, some syllables are super loud followed by super quiet ones

  • @kartikm7
    @kartikm7 6 месяцев назад +1

    Great content man, always getting learn something new from here!

  • @Howdyhowthis
    @Howdyhowthis 6 месяцев назад

    Cant we just do css module and use @component.

  • @joshuadeguzman2911
    @joshuadeguzman2911 6 месяцев назад

    I think it would be better to create an array of links if links have similar styles except for active status. It'll make it easier to add new links and style them similarly and could simply highlight the active link.

  • @slliks4
    @slliks4 6 месяцев назад

    Overriding is still a flex complex thing for me 😅
    I just write CSS code if it Gets too complex

  • @slliks4
    @slliks4 6 месяцев назад

    Or repeat in a more fancy way
    Create an array of dic with the link name as a key
    Map through it in your jxs and just style one of the tag

  • @obasaajibola3933
    @obasaajibola3933 6 месяцев назад

    please create an awwwards like preloader animation on your next video with framer-motion and react or nextjs

  • @victorshirokiy9883
    @victorshirokiy9883 6 месяцев назад

    Instead of variants logic, you can define custom classes with {@apply: bg-white text-black ...}

  • @Dreamslol
    @Dreamslol 6 месяцев назад +1

    The buttons look so cute!

  • @0xAndy
    @0xAndy 6 месяцев назад +3

    Love this channel.

  • @felipefregginrules
    @felipefregginrules 6 месяцев назад +1

    Love this!

  • @daleryanaldover6545
    @daleryanaldover6545 6 месяцев назад

    Finally found Tom, the maker of JDSL 😂

  • @ДенисМаценко-м2р
    @ДенисМаценко-м2р 5 месяцев назад +1

  • @ofeklevy1242
    @ofeklevy1242 6 месяцев назад +1

    GREAT

  • @miwhcyvybaksjd
    @miwhcyvybaksjd 6 месяцев назад +1

    Insane that anyone has the time per mental space to deal with this nonsense.

    • @aliventurous
      @aliventurous 5 месяцев назад

      How would you deal with it?