Why is Everyone Talking About This CSS Framework?

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 เม.ย. 2023
  • There's a new kid on the block. Another CSS Framework. Can it live up to the high standard TailwindCSS had set years ago? Does it bring even more to the table?
    My links
    My GitHub: github.com/joschan21
    Discord: / discord
    Video links
    UnoCSS: unocss.dev/
    WindiCSS: windicss.org/
    TailwindCSS: tailwindcss.com/
    Very interested in hearing your thoughts on this.
  • วิทยาศาสตร์และเทคโนโลยี

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

  • @starlederer
    @starlederer ปีที่แล้ว +39

    0:08 it did the same thing but much faster. JIT was the whole point.
    0:22 no surprise, UnoCSS is made by the same people and it was always supposed to replace Windi
    0:48 UnoCSS is not a replacement for taiwlind. @unocss/preset-wind is. UnoCSS can do non-tailwind stuff as well
    2:36 You don't have to use the shortcuts
    3:22 In UnoCSS itself, there is none but the default preset does come with some shortcuts. You don't have to use the default preset. There is an official preset that doesn't have this: @unocss/preset-wind
    3:59 Once again UnoCSS (in this context) does not replace Tailwind, it replaces PostCSS

  • @jamesbenson7622
    @jamesbenson7622 ปีที่แล้ว +48

    It seems odd to not want to switch for 5x better performance because it has an optional feature that you don't want to use.

    • @nclsDesign
      @nclsDesign 10 หลายเดือนก่อน

      @@AshutoshSharma-ml6sv Hhhhhhhhhhhuuuuuuuuuhhhhhhhhhh????????

    • @theilluminatimember8896
      @theilluminatimember8896 6 หลายเดือนก่อน +1

      This confused me as well since Tailwind can do the same when using @apply

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

    I've just played around with UnoCSS, I like it, I think a follow up video on the differences and similarities would be cool.

  • @tempaccount8256
    @tempaccount8256 ปีที่แล้ว +5

    It mixes all ui frameworks like bootstrap, tailwind, etc, into a single generated output.
    There are some projects in which legacies used bootstrap, but as a new development, if we want to tailwind, it will generate two outputs, two css files, one is heavy bootstrap and another is stripped tailwind, so unocss, with help of plugins, aggregate all classes and styling into a single stripped bundled css

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

      That's a cool feature for sure, not a reason to switch imo

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

      @@joshtriedcoding yes, it isn't😅😅
      I'm a hard-core tailwind fan myself 😅

    • @Andrey-il8rh
      @Andrey-il8rh 6 หลายเดือนก่อน

      Sorry, are you high? Where did you find out such absurd information? UnoCSS is a pure functional CSS framework, it has nothing to do with Bootstrap or anything else that you wrote, stop sharing misinformation and just read the docs

  • @klarion7360
    @klarion7360 ปีที่แล้ว +5

    In tailwind you can use both too with the @apply directive

    • @Andrey-il8rh
      @Andrey-il8rh 6 หลายเดือนก่อน

      Guess what, Uno also has @apply

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

    Tailwind is an architecture, a design language and a (rather messy) implementation of both. UnoCSS is an engine for your own css architectures & their implementations.
    UnoCSS does come with a preset that mimics Tailwind by default but the benefit is that you can rather easily make your own presets that might work better for your projects. I can list many examples where this is useful:
    - I built my own version of Tailwind that automatically handles light/dark mode colors and uses logical properties where possible.
    - If you target older browsers you can make a preset that produces errors when you use utilities that are too modern.
    - If there is a new CSS feature that is not supported by Tailwind yet (like scrollbar-color) you can very quickly implement it yourself.
    On top of that UnoCSS is insanely well architected and you can chain a lot of extensions without any problems which allows you to use things like hover:(bg-blue-900 text-blue-50) with your own utilities.
    UnoCSS is more than just better Tailwind, but even in cases when you want to use it like that, it still still much easier to customize and cover niche cases that the Tailwind team might not have though of.
    source :- @starlederer
    bottom line is that it is a great tool and people have a choice to stick to what they love.

    • @Andrey-il8rh
      @Andrey-il8rh 6 หลายเดือนก่อน

      It's great to see people who actually read the docs and understand what the tool is all about. Tailwind is a child toy compared to UnoCSS, I can't even compare them since they have absolutely different internal implementation

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

    Isnt shortcuts the same as the @apply directive with Tailwind?

  • @ibrahimraimi_
    @ibrahimraimi_ ปีที่แล้ว +4

    I'm sticking with Tailwind and Radix UI

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

    Cool video!
    Is there any UI kit for UnoCSS?

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

    I have to disagree with you on this one, tailwind also has the shortcut counterpart where you combine atomic classes together with layer and apply. They are basically the same, and abstracting repetitive code is also useful

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

    Can we create our own social media platform for developers with different design from others?

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

    Great video. Personally, i'd be intrested to try Uno when procrastinating or something 😂😂... I have a vague memory of people not really liking tailwind all that much when it wasn't as popular (it had many config steps and wasn't out-of-the-box ready), I even had to force a dev to try it out once and then they ended up really liking it alot...so I think you'll never know 🙂

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

    tailwind:
    lg:w-full lg:h-full lg:flex lg:flex-col lg:justify-center
    uno:
    lg:(w-full h-full flex flex-col justify center)

    • @Andrey-il8rh
      @Andrey-il8rh 6 หลายเดือนก่อน +1

      And with Uno shortcuts you can have above as
      lg:(full f-col center)

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

    what are shadcn variants ?

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

    How about chakra ui?

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

    Idk the library but doesn't even in using UnoCSS shortcuts, the framework itself atomically replace the values in build ?. I would gladly stop rewriting a perticular code if it can be made into a component of its-own (like with CVA, stiches) if it doesn't compromise on the performance ( here atomic value extraction).

    • @Andrey-il8rh
      @Andrey-il8rh 6 หลายเดือนก่อน

      Uno is a pre build framework, it's not executed in prod, so there's no downgrades to performance

  • @maskman4821
    @maskman4821 ปีที่แล้ว +4

    I will stick to Tailwindcss and Daisyui, they are great enough to meet the demands from all sorts of ui, life become so much easier because of these two libraries 😍👍😘😀😎🤩

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

      Cheers, heard lots of positive feedback on DaisyUI recently

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

      @maskman4821 How do you handle accessibility with DaisyUI ? Like pressing `Tab` to select list of items, pressing `Esc` to close a modal / dialog etc. ? Since DaisyUI is a CSS file at the end, how do you deal with this issue ?

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

    Most of these new "solutions", libraries, frameworks etc. try and solve issues that were never issues to begin with.

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

    you should talk about twind, its a css compiler that makes tailwind in js waay better

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

    Josh, please make a playlist learning t3 stack from beginner to be hero

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

    tailwind CSS also have the same thing(combining CSS classes in to one class using @apply) but they don't recommend it.

    • @Andrey-il8rh
      @Andrey-il8rh 6 หลายเดือนก่อน

      Who don't recommend it? This is direct recommendation from Adam Wathan

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

      ​@@Andrey-il8rhAdam Wathan doesn't recommend using @apply

  • @kyuss789
    @kyuss789 ปีที่แล้ว +4

    Uno isn’t a replacement for tailwind. It replaces postcss, which is what tailwind is build on, tailwind can be build on uno and it is with preset-wind
    You argument around “abstract” vs “atomic” classes is a criticism of tailwind with daisy ui as well and even then it’s purely subjective

    • @Andrey-il8rh
      @Andrey-il8rh 6 หลายเดือนก่อน

      Give him some rest, the boy just a junior dev, he doesn't understand those tools good enough yet. Btw, UnoCSS works perfectly with PostCSS 😉

    • @kyuss789
      @kyuss789 6 หลายเดือนก่อน

      @@Andrey-il8rh considering they still call it experimental I wouldn’t say “perfectly” but yes you can use it with postcss as well.

    • @Andrey-il8rh
      @Andrey-il8rh 6 หลายเดือนก่อน +1

      @@kyuss789 I'm not talking about initializing Uno via PostCSS, what I mean is that you can use PostCSS along with it, for example to inline Uno output into HTML

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

    Thanks Josh for your introduction for uno-css, but I think I'm sticking with Tailwind-css. Cause like you said uno-css is good but not better than Tailwind and Tailwind does so much more uses for now to me.

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

      Uno css does a few things tailwind doesn't. Attributes, CSS icons, custom fonts. I think code with erik has a good video explaining the additional things.
      Unocss is a superset of tailwind. It's like Typescript and Javascript.

    • @Andrey-il8rh
      @Andrey-il8rh 6 หลายเดือนก่อน

      Well, if you absolutely don't understand the principals behind UnoCSS yeah you better stay on Tailwind

    • @Andrey-il8rh
      @Andrey-il8rh 6 หลายเดือนก่อน

      ​@@saladmancer8151I would say it does all the things better than Tailwind 😂

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

    You are doing great 👍 😊

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

    Actually uno is not that new… has been there for a bit by now… is for the same guy that does vitest and other vue ecosystem tools, pretty good and smart dude to follow

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

      *from

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

    i dont see these approaches as opposing, daisy ui just abstracts extremely reusable items into 1 class, you can still add on with tailwind classes to it

  • @ofeenee
    @ofeenee ปีที่แล้ว +5

    Shortcuts is a feature, not a flaw. If it results in “code entanglement”, the blame for that falls on the developer using the e framework, not the features provided by the framework; especially when that feature is completely optional. Your rationale is unfair, borderline stupid. Everyone is free to use whatever they want, and I’m all for that. To clarify, I’m strictly criticizing the reason you gave for not wanting to use it, and not against you using whatever you like.

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

      At the point that you're creating css classes like "btn" you're right back at writing normal css, so why even use Uno then. IMO using shortcuts or @apply in tailwindcss is an antipattern. Completely unnecessary since in web dev we design using libraries that use components.

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

      @@roach_iam I see your point, but I wouldn’t say it’s completely unnecessary, and I wouldn’t say it’s like writing normal css. The framework is doing more underneath than just normal css (a simple example would be adding vendor prefixes when necessary). I can see myself wanting to use it in certain situations. Having it as a feature available to use for certain needs/situations when it makes more sense to do so is a good addition as a complimentary feature. If anyone sees this not needed, they can simply not use it without it having any negative impact on the development experience for choosing not to.

    • @Andrey-il8rh
      @Andrey-il8rh 6 หลายเดือนก่อน

      Jesus, guys, shortcuts is not a tool to create components like btn, it's a tool to create SHORTCUTS! Shortcut is a higher order utility, for example a lot of time you will have patterns in your utilities that frequently goes together like w-full h-full. For that you can have a shortcut - full.
      Another example, almost always we have to write flex flex-col, why not shorten it to f-col? In the end we can have much shorter classes in HTML, but what's important we still use functional approach, shortcuts can also serve as unification layer between themes. Imagine that you have 2 themes in the project, each theme uses different headings style, so instead of creating a component for everything or some kind of a condition directly in your HTML you can create a shortcut themed-heading-1, when building first theme it will build to something like font-primary underline font-bold, and for another theme it can be font-secondary uppercase

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

    First time I hear about it lol 😆 so much for everyone...

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

    Yo do you prefer vite or next js?

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

    Count me out too 😊

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

    so now insted of using daisy ui + tailwind i can just use uno

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

    And here we still are waiting for NextJS integration that isn't "meh"...

  • @luisdanielmonsalveruiz1987
    @luisdanielmonsalveruiz1987 6 หลายเดือนก่อน

    this is wrong you can also make that feature "shortcut" in tailwind with the package cva

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

    I'm not a fan of Adam from tw at all. First I got into a thing with him on Twitter when they were trying to charge early adopters an extra $20 for the e-commerce portion of tailwind-UI, which at the time was an extremely overpriced library, that gave you some pretty Meh components. He even somehow cross-referenced my twitter to get my email and then emailed me about it. He later changed his tune and said one price forever. Then they also ripped the JIT compiler by pretending to want to hire Anthony to get how he built the JIT compiler out of him. Then, later on, they had to be forced to give credit to him. Uno is quicker and does a way better job of making matchers for the classes than tw does. You can even just throw on script tag, where tw JIT is like 500kb gzipped the uno JIT is like under 20kb gzipped, you could potentially use it in production if you just had a simple HTML page. I believe it even has a way to eliminate the FLOC if you are using the script tag. I don't think TW is bad, I just don't like supporting the products of toxic people who like to create drama for self-serving reasons.

  • @user-gf9ri4wj5h
    @user-gf9ri4wj5h ปีที่แล้ว

    Js framework, css framework, typescript framework, omg 😂

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

    uno is a great way to make mess

    • @razorflash__
      @razorflash__ 3 หลายเดือนก่อน

      tailwind:
      lg:w-full lg:h-full lg:flex lg:flex-col lg:justify-center
      uno:
      lg:(w-full h-full flex flex-col justify center)
      How is uno making a mess ?

    • @coders_rant
      @coders_rant 3 หลายเดือนก่อน

      letting one use all ui framkeworks eg tailwind bootstrap, in one is surely not fail proof @@razorflash__

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

    but UnoCss is not bad too :D

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

    Tailwind CSS only

  • @Andrey-il8rh
    @Andrey-il8rh 6 หลายเดือนก่อน

    It's that time when a guy recorded a video after spending 3 minutes in docs, saw shortcuts, completely misunderstood it's purpose and decided to get this to TH-cam. Sad truth is that you can't know the difference between things you simply don't know. You don't know how Tailwind works and you don't know what is UnoCSS. Before recording any video on the topic you should first read at least 3 pages of the docs

  • @KyKiske420
    @KyKiske420 4 หลายเดือนก่อน

    sue your barber

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

    bro just use objects to extract the styles const styles = {
    btn: 'rounded-lg ...'
    textSmall: '16px semibold .. '
    }
    And use them in ur components this frameworks are just a miss i personally prefer to use raw css

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

    No matter how hard I try I just cant find myself liking tailwind or similar things. Your elements become so bloated with classes that it may as well just be inline styling. I think I will just stick to regular SaSS...

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

      have you tried using utility functions like tailwind-merge and clsx?

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

    I don't use any CSS Framework. Too much garbage in them even Tailwind, just look at the reset.

    • @Andrey-il8rh
      @Andrey-il8rh 6 หลายเดือนก่อน

      Reset is optional and can be disabled

  • @businessoftechnology
    @businessoftechnology 11 หลายเดือนก่อน

    This is a different approach, not right and wrong, but personal perspective. My perspective says, if a designer wants to get paid by the hour, Tailwind will fill the bank. If a designer wants to make the HTML ugly, Tailwind is the right tool for the job.
    Again, there are tradeoffs. The right tool is based on the developer, designer, team, project, etc. Tailwind is awesome, but not always.

    • @Andrey-il8rh
      @Andrey-il8rh 6 หลายเดือนก่อน

      Describe cases when it's not

    • @businessoftechnology
      @businessoftechnology 6 หลายเดือนก่อน

      Tailwwind leaves fingerprints of the control freak, LOL. DaisyUI for instance is not anti-tailwind, but works with the strengths without leaving the fingerprints everywhere.@@Andrey-il8rh

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

    I also want to say, try it before start having an opinion. You don't even know what it enables you do, don't trash on peoples hard work creating a 5min stupid video after scrambling around the library for 5min. Sure stick on to making things in your way but try to understand what is the real problem the library creator is trying to solve. What that means for the community. Don't be the fish in the tank.

  • @jenstornell
    @jenstornell 11 หลายเดือนก่อน

    Tailwind 4 will be like 3x faster than version 3.

    • @Andrey-il8rh
      @Andrey-il8rh 6 หลายเดือนก่อน

      And Tailwind 8 will be 25 times faster, right

    • @jenstornell
      @jenstornell 6 หลายเดือนก่อน

      @@Andrey-il8rh It will change engine, that's why.

    • @Andrey-il8rh
      @Andrey-il8rh 6 หลายเดือนก่อน

      @@jenstornell any specific scores that you provide at this point is pure speculation since it wasn't released yet. Change of the engine may easely result in 3x slower real world performance, you will never know until it's released

    • @jenstornell
      @jenstornell 6 หลายเดือนก่อน

      @@Andrey-il8rh Adam had a very good presentation about it. 😁

    • @Andrey-il8rh
      @Andrey-il8rh 6 หลายเดือนก่อน

      @@jenstornell of course Adam will place it in the best light, he is the most biased person since he is the author, but did you do any independent personal testing? Or you just repeated the advertisement?

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

    TailwindCSS is a mistake. Don't get me wrong, is the best CSS framework right now by far, but it has no future, it can't improve, and is bad for complex stuff. But just wait, soon new CSS frameworks will emerge and change that.

  • @Ivan-wm6gm
    @Ivan-wm6gm ปีที่แล้ว

    aren't you guys tired of introducing new CSS framework were majority of companies won't even use?

  • @18.j
    @18.j ปีที่แล้ว

    Kinda useless and boring that we keeps getting libraries like tailwind, none of them add an extra feature that really impress you to switch to it they are all the same with minor changes that you dont even feel or need

    • @razorflash__
      @razorflash__ 3 หลายเดือนก่อน

      so you'd rather use hover: x hover:y hover: z hover: a like this rather than hover: (x y z a) ?

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

    not a framework

  • @oussamasethoum2755
    @oussamasethoum2755 7 หลายเดือนก่อน

    unoCss is better.