Facebook Tried Tailwind, Then Built This Instead

  Рет қаралды 125,591

Theo - t3․gg

Theo - t3․gg

8 ай бұрын

Much more into StyleX than I expected. Genuinely hyped on their philosophy and general direction. Learned all the right lessons from Tailwind, Vanilla Extract, Styled Components and more. Turns out the React team really does pay attention 🤣
Link to the site stylexjs.com/
ALL MY VIDEOS ARE POSTED EARLY ON PATREON / t3dotgg
Everything else (Twitch, Twitter, Discord & my blog): t3.gg/links
S/O Ph4se0n3 for the awesome edit 🙏

Пікірлер: 410
@zdeneksc2895
@zdeneksc2895 8 ай бұрын
So we need to again come up with these lovely names like .card-primary-container just to create a flex-box column. The only thing I'm not missing is naming things.
@iamghezali
@iamghezali 8 ай бұрын
finding correct names for the components is enough of it self lmao
@andrewkosenko2757
@andrewkosenko2757 8 ай бұрын
And this is exactly the reason why tailwind is a no-brainer. It’s better than bootstrap, easier to write with. If you need to reuse styles, just put them into string variable and use interpolation in classname. The only drawback to that approach is that you’ll need to name it something. And that you have several pieces depending on the same variable, but that’s fixable by overriding what’s needed
@tahamohammedi5898
@tahamohammedi5898 8 ай бұрын
@@andrewkosenko2757 The comparison with bootstrap is offensive at this point, Bootstrap provides uncostumizable components tailwind gives you classes to use like pure css, there's nothing in common
@boenrobot
@boenrobot 8 ай бұрын
It seems like with stylex, you are allowed to just repeat yourself, so you may not have to come up with uniformed names... If your resulting style object is the same, it will compose the same way, regardless of its name. During pre-compilation, style objects with the same props and values end up with the same css class name across the project.
@andrewkosenko2757
@andrewkosenko2757 8 ай бұрын
@@boenrobot you will still have to create names for unique things, which is an overhead, tailwind allows you to remove this overhead completely AND is still mostly easily readable (except some obscure cases with millions of props per div)
@JT-mr3db
@JT-mr3db 8 ай бұрын
From a shareable styles perspective this does look pretty cool. Dev experience wise it doesn't cut tailwinds lunch, not even close.
@andrueanderson8637
@andrueanderson8637 8 ай бұрын
cut their lunch? never heard that phrase, is that a bad thing?
@cyrus01337
@cyrus01337 8 ай бұрын
@@andrueanderson8637 It doesn't even come close, is what it means.
@JT-mr3db
@JT-mr3db 8 ай бұрын
It translates to "Make a move on someones territory". Typically used in the pejorative but not in this case.@@andrueanderson8637
@portalteam5832
@portalteam5832 8 ай бұрын
@@andrueanderson8637 its like stealing a girlfriend... so this isn't going to takes developers from tailwind, at least not ones that care more about dev experience than shareability
@LabhamJain
@LabhamJain 8 ай бұрын
​@@andrueanderson8637meaning it can't compete with tailwind
@goldforest06
@goldforest06 8 ай бұрын
the second I see a css library that requires you to name things I get fatigued XD
@crade47
@crade47 8 ай бұрын
this is literally how you do styles in react native
@halilsmith8162
@halilsmith8162 8 ай бұрын
haha fr
@leonardodavinci2856
@leonardodavinci2856 4 ай бұрын
was about to write the exact thing @@halilsmith8162
@matthall8845
@matthall8845 3 ай бұрын
which I'm really pleased about, I really don't like the Tailwind approach personally
@MarkJaquith
@MarkJaquith 8 ай бұрын
I like this sort of video. Even if you aren't going to use something, you can learn a lot from seeing how different projects choose different values and tradeoffs.
@patrickjreid
@patrickjreid 8 ай бұрын
I am so grateful for this channel! Thank you Theo for communicating all these hard concepts so concisely! I have a request for a topic on Next.js, no one seems to be talking about and breaking down the "down the tree" concepts. I don't know why but something about it is really tough for me to wrap my head around. Another rant I would love to hear would be an update on "don't use MUI with Next.js!" Thank you again for all the awesome content!
@EvilTim1911
@EvilTim1911 8 ай бұрын
I never really understood why people shy away from just regular old (S)CSS. The project I'm working on right now just has SCSS and Vue scoped styles and I never felt like I needed a fancier solution than that. I can pump out pages with responsive layouts just as quickly as with tailwind and I'm still in the "Tailwind makes my markup look messy and horrible" camp so I prefer this approach. Overall when I think about it I probably spend less than 5% of my time styling things so I never felt that was an area where I needed a 10% improvement in my workflow. But hey, your mileage can vary.
@Chainwax
@Chainwax 8 ай бұрын
The whole time I watched this I was thinking the same thing. I recently made a couple of SvelteKit apps and just rolled with the component scoped css + a global file. All this over-engineering to avoid writing css seems a little ridiculous. Even at work, where we have a very large codebase, the internal component library was completely done with styled components, which is basically just giving you scoped css in a Reacty way. The premise of “writing css is confusing/not scalable/time consuming” really isn’t true if you… know how to write it.
@ctw-home
@ctw-home 8 ай бұрын
if you think that plain scoped css is good, then your are definitely missing what tailwindcss can do for you. which is basically the same as plain CSS but with super-mega-dupper powers. No, seriously, if you take the time to play with it you'll see.
@huge_letters
@huge_letters 8 ай бұрын
ScopedCSS does solve some of the same problems Tailwind solves but not all of them - the main one being that with ScopedCSS 2 components with similar CSS will create 2 separate CSS "modules". That's not the case with Tailwind, ALL of your styles are reused do to its atomic nature. This leads to smaller bundle size.
@EAlexHaywood
@EAlexHaywood 8 ай бұрын
Tailwind is a lot less fancy than SCSS lol, but I agree Stylex is just like all the other css in js solutions: overengineered
@tuananhdo1870
@tuananhdo1870 8 ай бұрын
I can not live without tailwind now. Why make your life harder without it
@lukasmolcic5143
@lukasmolcic5143 8 ай бұрын
Tips for those still using BEM, if there is anyone out there, your component name is the name of the block, you anyhow have to name your component with a unique name, make that the name of your block, and then for the elements and modifiers inside of it, just use anything you would like, you are scoped to that component, unfortunately next wont allow you to import that css file to a single component, but you can still keep it in the same folder and then import it to a global css file you have included in the app or wherever, when you stop using the component, just delete the whole folder and the compiler will let you know where were the files still being referenced.
@vichetnoeng706
@vichetnoeng706 8 ай бұрын
I prefer Tailwind😁
@quantran4704
@quantran4704 8 ай бұрын
ReactJS from FB is enough :))
@mauriciabad
@mauriciabad 8 ай бұрын
Great video! This is an indirect way of teaching people how to go through documentation and what line of thought to follow.
@Viviko
@Viviko 8 ай бұрын
I think this is great if you are making a component library. For apps, I will stick with Tailwind.
@DryBones111
@DryBones111 8 ай бұрын
Just remember that Facebook made this to solve Facebook problems. This looks like a big step back to me for many other types of projects, and comes with a lot the same drawbacks that CSSinJS usually comes with. I also find the claim of colocation laughable considering all of their examples import some nonsense CSSinJS objects from the depths.
@seghirissam2662
@seghirissam2662 8 ай бұрын
Just remember facebook create react to solving their problems too But you used it any way or other developers used it
@TheNeonRaven
@TheNeonRaven 8 ай бұрын
@@seghirissam2662 and this is why the warning from @Drybones111 is justified. Too many devs jump on every hype train and cause massive amounts of tech debt, bloated slow applications for the end user, and tonnes of friction on starting up new projects. Nothing wrong with using this or React, but the caution is to introduce new tech when/IF you need it.
@DryBones111
@DryBones111 8 ай бұрын
@@seghirissam2662 You made my point for me.
@jacksonbourne
@jacksonbourne 8 ай бұрын
@@seghirissam2662 Sure, but it turns out React is a steaming pile of garbage that is dragging the frontend ecosystem to a standstill for a lot of developers
@CottidaeSEA
@CottidaeSEA 8 ай бұрын
@@seghirissam2662 React is unnecessary for most websites, so I do not see the issue.
@griffadev
@griffadev 8 ай бұрын
I really think libraries themselves should have these sorts of docs exploration videos on their sites, so good.
@abdulazizaskaraliev6119
@abdulazizaskaraliev6119 8 ай бұрын
I just started using tailwind and rewrote small part of our product in tailwind. I felt in love with it. Haven't watched the video yet, but I hope it'll be usefull.
@REAZNx
@REAZNx 8 ай бұрын
Yeh I’m still missing the point in this, it’s just styled components v2…
@guxit
@guxit 8 ай бұрын
I was thinking the same, but I guess the difference is that this is framework agnostic. But then again, so is CSS.
@vitorwindberg4212
@vitorwindberg4212 8 ай бұрын
I don't get it also, when I saw the video title I thought "oh! something to challenge tailwind and be possibly better? I have to check it" and then I see this...
@christopherpoulsenfernande1624
@christopherpoulsenfernande1624 8 ай бұрын
I think using svelte and tailwind in combination is the best of both worlds, when I need a css class for reusability or whatever reason I can declare it in the style tag.
@TayambaMwanza
@TayambaMwanza 8 ай бұрын
I think its good that all these various solutions come up, there still isnt a difinitive solution to the disconnect of css from js and html but I believe we're inching closer to a proper aha moment.
@xingliu7071
@xingliu7071 8 ай бұрын
Tailwind is also on top of shipping newest css features (like :has, or the ability to use custom inline var to make framer-motion animations ‘dynamic’) and provides great documentations on how to use them, I can see they’ll come up ways to organize inline css on a code editor level and give more intellisense power to help developers. But it’s interesting on stylex is heading towards to…
@TheNewton
@TheNewton 8 ай бұрын
There's something that ships the newest CSS features even more BLAZING fast plain ole CSS 💨🔥 🚀
@victorv7356
@victorv7356 8 ай бұрын
Facebook can’t do that because they support old browsers so can’t always keep up to cutting edge CSS features
@u007james
@u007james 8 ай бұрын
tailwind shorten the styling and make it visible on the component level itself. sylex is doing that is like doing inline, split up the script into another file or section and make it difficult to see the styling like traditional styling. maybe the solution to scalable tailwind is to create classes that encapsulate number of classes
@zbik
@zbik 8 ай бұрын
That's what I do in svelte with postcss & tailwind. I can just do .myclass { @apply px-2 py-1 text-lg } to apply a long list of tailwind classes under my own class name. Just makes writing styles a lot faster (and it's still in the same file as the markup and scripts)
@u007james
@u007james 8 ай бұрын
@@zbik but post css may need to do cleanup for those duplicated and overwritten classes, not sure if it does that
@aaaaanh
@aaaaanh 6 ай бұрын
the idea looks promising, sometimes I'm being lazy and write a const someComponentStyle = `some tailwind classes` and just reference that in multiple element/components' className and styleX might solve that(?), being able to have a centralized piece of code to update the style
@2penry2
@2penry2 8 ай бұрын
This feels very similar to SCSS modules used at a component level.
@MobiusCoin
@MobiusCoin 8 ай бұрын
It's got some interesting features as does UnoCSS and I might choose it for a greenfield project but these things aren't enough for me to migrate an existing project from Tailwind to this.
@johndevnoza4223
@johndevnoza4223 5 ай бұрын
btw in your opinion, as junior should i learn styleX for my portfolio? in terms of getting more chance to land a job.. ? or should i focus to learn different css framework?
@mohithkumar1624
@mohithkumar1624 8 ай бұрын
I still like tailwind more😅, as It maintains sweet spot between convenience and scalability.
@flammea_
@flammea_ 8 ай бұрын
Looks like better css modules more than better tailwind. I really like it!
@meeko6692
@meeko6692 8 ай бұрын
Usually I’m using Stitches for styles with Framer Motion for animations. What would be the #1 reason to consider StyleX?
@r3js
@r3js 8 ай бұрын
This looks very cool! Tailwindcss was resolving a great problem for me, reducing the styles size in my bundle, it's the best tool I've used so far for that. But Stylex seems to bring that promise while allowing us to keep our markup cleaner and the related properties grouped under a classname again. Yes, we would need to name things again, but I don't think that's a problem when we are just talking about a handful of classes per component. And furthermore, since they are scoped to the component those class names can even be repeated across components. On the other hand, I think many people here may be missing the point of Stylex. I don't think this is like emotion, CSS Modules + classnames, or like makeStyles in MUI v4. Sure, the syntax and UX may be similar, but that's it. Stylex is atomic, and the CSS output is static (like in CSS modules, but unlike emotion). Although looks like the may add some stable support for dynamic styles in the future. I'm not that into the idea of the "the last style applied always win". I get where the idea comes from, but on the other hand is counter intuitive when you are used to think in a different way. I guess i'ts just one of those nuances to get used to when using certain libraries. Overall, I'm very excited about this and to see how this project evolves. I love using tailwind, but I'd be more than happy to switch to something that wouldn't require me to define all the styles in the markup, and specially be able to compose and re-use groups of style properties again while still benefiting from using atomic classes in the bundled code.
@n8guy
@n8guy 7 ай бұрын
A global CSS module file may get you exactly what you’re looking for.
@thecoolnewsguy
@thecoolnewsguy Ай бұрын
Just use a global css file?
@dv_interval42
@dv_interval42 8 ай бұрын
The fact that they said "kind of" for colocation in Tailwind triggered me. Stylex seems like a step backward but whatever floats one's boat I guess.
@MarkJaquith
@MarkJaquith 8 ай бұрын
Yeah, but there was a big disclaimer over that section... that might have been one person's spur-of-the-moment judgment, thinking "well, the actual CSS rules are elsewhere". So maybe they'll change that. To me, Tailwind has BETTER colocation... the styles are on the elements, not just in the same file.
@NamanGoel34
@NamanGoel34 8 ай бұрын
@@MarkJaquithThat’s exactly what it was. That table is the least complete part of the docs. It’s not released yet, I was just trying to get some early feedback. PandaCSS checks all the boxes too for example.
@user-xo4gu2uu6r
@user-xo4gu2uu6r 8 ай бұрын
I am still using sass modules for pretty much everything. It works. I hate writing any media queries so a function does it all. I also use twbs /rfs for font sizes and container padding mainly. I don't know if I can do it without rfs in the future. I am just afraid that rfs might die one day.
@KangoV
@KangoV Ай бұрын
I really do envy KZfaqrs in the front end dev space. They get a continuous stream of new frameworks for their content :)
@kriffos
@kriffos 8 ай бұрын
I'm still impressed by what huge code monsters developers have come up with to work against the nature of CSS, instead of following the CSS path and using its strengths.
@CodingPhase
@CodingPhase 8 ай бұрын
lol yes I feel the same.. instead of just using css.. just because people don't know how to name elements or just don't even know how to use css.
@axa993
@axa993 8 ай бұрын
Nope. Using just CSS is fine but when building out reusable components you need a library to help you out and speed up the development. Personally, I rely on CSS/SCSS modules and Tailwind to keep it simple but libraries like this are great for building reusable component libraries.
@paragateoslo
@paragateoslo 8 ай бұрын
​@@axa993 How exactly does this make it easier than just using css modules for scoping and a package like classnames to do dynamic classes?
@Pete133
@Pete133 8 ай бұрын
It's really strange hearing Theo say @17:09 that the way css cascading works isn't intuitive at all... I think the only way that viewpoint makes sense is if you learned tailwind before learning normal css. It makes perfect sense if you've ever written more than one .css file. I do get that Tailwind makes this more confusing, because Tailwind creates an extra layer between the developer and the actual css. I can even see how styleX's approach could make css cascading a lot more simple(like many other css-in-js solutions). But saying that css cascading isn't intuitive and doesn't make any sense is pretty dang silly. Yes a css library like this might make things easier, but in no way is css cascading "nonsense".
@tuananhdo1870
@tuananhdo1870 8 ай бұрын
Using css feel like driving bicycle vs tailwind is like a car
@muralielumalai
@muralielumalai 8 ай бұрын
a different way to write classNames basically
@NamanGoel34
@NamanGoel34 8 ай бұрын
Thanks for the feedback! I just updated the website based on it.
@perc-ai
@perc-ai 8 ай бұрын
Hi Theo, Its me again, your favorite Hasura user. We are at the point of the web where its literally just about power. We keep reinventing the same shit over and over with some slight modifications. Then some genius comes along and shatters everything we took for granted single-handedly shifts us into a new paradigm. I think tailwind was that paradigm but this stylex is just a rehash of it, doesn't seem as revolutionary tw. We been already looking into atomic universal styling with TamaGUI.
@dixztube
@dixztube 8 ай бұрын
Man I agree with this. I wonder if these companies just shell out money to get the coverage
@danieljing9319
@danieljing9319 8 ай бұрын
what difference between this and styled-components, I can see this is 99% similar with styled-components
@dogoku
@dogoku 8 ай бұрын
I don't agree that styling elements using their relationships (or as they call it "at a distance") is a bad thing. I do agree that all styles of a component should be defined in one place, but I also believe that clearly representing relationships is important. When using Sass I have always worked in a specific way, where all styles for a single component must be inside the same block, e.g .my-component { }. Meaning that I don't use `&:hover > .my-component` in the parent block, as that would violate that rule. Instead I use `:hover > &`, which is basically declaring a variant style of that component when the parent is hovered, keeping all styles related to that component in the same place and preserving the relationship between parent and child. If StyleX finds a way to preserve these use cases, then I might be inclined to take another a look, but until then, this feels like a half baked lib to me and would not be using it in a real project.
@refreshfr
@refreshfr 8 ай бұрын
Yeah, them saying "It is currently impossible for a child element to have conditional styles when it's parent is hovered, we already have some ideas to make these patterns possible in the future," was really weird IMO. Disabling one of the core feature of CSS to potentially reinvent it afterwards?
@mast1999
@mast1999 8 ай бұрын
I'm looking forward to when this is open sourced, and then we get some community packages that let you create Stylex styles in line and not name them. Then it would be really damn close to tailwind.
@w00t360
@w00t360 8 ай бұрын
To me, I think you summarised it pretty well with StyleX requiring more "cognitive overhead" which is something I as a developer am not interested in.
@bluecement
@bluecement 4 ай бұрын
doesn't vanilla-extract already provide this functionality? or am i missing something?
@qaz1617
@qaz1617 8 ай бұрын
Sorry for my ignorance but, how is this different from just plain CSS clases and then use those class names? I know I'm missing something.
@muhammadmejanulhaque3305
@muhammadmejanulhaque3305 7 ай бұрын
I like the pattern they followed, but being able to see all element's styles in one file is a huge help with Tailwind.
@jnevercast
@jnevercast 6 ай бұрын
I believe the StyleX styles are also in one file? Unless you mean something else.
@BertVerhelst
@BertVerhelst 8 ай бұрын
Sounds cool. But not having a solution for hover is a big gap in the capabilities. Unless they expect you to use the old css system for those?
@parkourbee2
@parkourbee2 8 ай бұрын
Definitely sticking with tailwind, but thanks for covering this.
@RemotHuman
@RemotHuman 8 ай бұрын
This is the same thing as traditional CSS - you make class names that correspond to rules and then apply them. The only difference is you write the CSS rules in js and you can use the js import/export system, which I would say is better than using CSS files, but it literally is the same exact workflow so it seems Edit: I see they got rid of styles cascading down to children elements, so that's one thing that's different, might have missed some others in the video
@CottidaeSEA
@CottidaeSEA 8 ай бұрын
Another difference is that you can reuse names since they are bound to their own scope. This means you don't have to use methodologies like BEM just to have understandable CSS.
@refreshfr
@refreshfr 8 ай бұрын
@@CottidaeSEA With CSS modules (or vanilla CSS @scope) you can achieve the same behavior where the style you define only applies to the component/element tied to it without fear of affecting other elements even if they share the same class names.
@danielnieto1496
@danielnieto1496 4 ай бұрын
5:32 “it’s super counterintuitive” - talking about CSS (CASCADING style sheets)
@xDJxG0LD3Nx
@xDJxG0LD3Nx 8 ай бұрын
MUI has this exact thing already with the sx prop and theming
@punkweb
@punkweb 8 ай бұрын
Alternative video title: frontend continues to go downhill Tailwind was already stupid enough
@koyadream
@koyadream 8 ай бұрын
what is the deference between styled component
@gabrielmfern
@gabrielmfern 8 ай бұрын
also not needing another lsp server for this is awesome, that is one of the greatest benefits of React's DX over Angular's in my opinion
@3ventic
@3ventic 8 ай бұрын
The lack of styles-at-a-distance... Doesn't that mean that if you change the theme for example, your application now has to modify every single styled element in the DOM instead of just having the browser repaint the existing ones based on a top level class change? Or if you need to change the styling on every td in a table based on some toggle elsewhere in the application? The debugging concerns about styles-at-a-distance are certainly valid and it's a feature to be used with caution, but to throw it away entirely is something I'm very unsure about.
@jporfirio
@jporfirio 8 ай бұрын
Seems interesting, but I love not having to think of names for classes when using Tailwind.
@georgepamfilis7527
@georgepamfilis7527 6 ай бұрын
isnt this the same as stylesheet in react native?
@abstract_repository
@abstract_repository 8 ай бұрын
what's the difference with this and CSS in JS?
@jessequartey
@jessequartey 8 ай бұрын
Theo is good at saying what's in my mind. I like shadcn so much think whoever uses this to build a UI component library would make something crazily good to use. even better than shadcn
@Petyr25
@Petyr25 8 ай бұрын
Probably never going to use it but good to know!
@ashrafjefrizin4630
@ashrafjefrizin4630 8 ай бұрын
its just like old you declaring your custom class name, but now in fancy way 😌
@shockgalaxy9849
@shockgalaxy9849 8 ай бұрын
Can you do a video on pocketbase? I would like to hear your thoughts
@wrux
@wrux 8 ай бұрын
Cascading layers have fixed the styling order issues
@artu-hnrq
@artu-hnrq 8 ай бұрын
It was nice to know about it
@akshaybathe9953
@akshaybathe9953 8 ай бұрын
will be nice if we can define container like tailwind instead of CSS container: "flex items-center justify-center text-8xl"
@llothar68
@llothar68 4 ай бұрын
All i want is tailwindcss becoming a part of the HTML standart itself, write "sstyle: pt-10 pb-20" (sstyle for short-style direct css embedding).
@iamprincemuel
@iamprincemuel 7 ай бұрын
I like stylex features for the same reason I liked pandacss when it first came out, but switching from tailwindcss is no bueno for me. 1. I don't miss naming things 2. I dislike the object syntax for styles. Tailwind might be messy and repetitive e.g focus, active, dark mode states but it is still pretty readable. I can tell at a glance what classes are being applied on a component or easily debug issues. I really don't mind adding plugins like tailwind-merge and class-variance-authority.
@soundbeee
@soundbeee 8 ай бұрын
I‘m still stuck with runtime css-in-js because the DX is too good. In my case styled-components + style-system. Not having to think of class names, responsive style props that can be dependent on state, the possibility of directly writing css, colocation. Tailwind was the first zero-runtime approach where I thought it could be a livable alternative, despite its cryptic class names. But writing ad-hoc custom css is really weird in Tailwind. Still waiting for a better approach to land, StyleX isn‘t it.
@developerAKX
@developerAKX 8 ай бұрын
Me too, I only use emotion or styled Components. By using these the best thing I get is naming it always forces me to create good names and also all the class name crap is removed and only important stuff are visible in main component
@RacoonEvil
@RacoonEvil 8 ай бұрын
Why is this different from material ui useStyles?
@0xedb
@0xedb 8 ай бұрын
how different is it from the now defunct Stitches library
@michaelpumo83
@michaelpumo83 8 ай бұрын
Variable overrides is effectively Tailwind Merge plugin?
@Calinica93
@Calinica93 8 ай бұрын
Literally emotion. Wow..
@shahariarniloy8935
@shahariarniloy8935 8 ай бұрын
I think i really need a very good explanation about what is the “scale/scaling” mean!!
@hectormanuelgomezmedina9387
@hectormanuelgomezmedina9387 6 ай бұрын
We need an update of this video
@haithem8906
@haithem8906 8 ай бұрын
it looks soo much like how react first tried to include styles
@reanukeaves
@reanukeaves 8 ай бұрын
SCSS with modules is the sweet spot for me.
@JacoBoogie
@JacoBoogie 8 ай бұрын
Elon’s gonna be pissed when he finds out Zuck is naming his new css-in-js styleX
@denniscual4618
@denniscual4618 8 ай бұрын
Fb announced StyleX way back React Conf 2019 😅
@JacoBoogie
@JacoBoogie 8 ай бұрын
@@denniscual4618 damn so that must be where Elon came up with the new name for Twitter!
@SuperRideSky
@SuperRideSky 8 ай бұрын
yoo nice batik for batik day
@alexleung842
@alexleung842 8 ай бұрын
What makes you think this project is about to come out? Wasn't it abandoned years ago?
@xylemutopia
@xylemutopia 8 ай бұрын
This feels alot closer to something like emotion or styled components (as a class name rather than component) - doesn't seem like tailwind is the best comparison to this.
@AlNemec
@AlNemec 6 ай бұрын
I spend a lot of my day in CSS so I don't see CSS specificity as any sort of issue and if anything I appreciate it. But its interesting how often I see devs complain about it and try to get rid of it in these libraries.
@SimonCoulton
@SimonCoulton 8 ай бұрын
As a big fan of CSS modules, this is going to be a great middle ground. Might even be easy enough to ditch PostCSS as well (particularly with PostCSS functions). Edit: wonder how it might integrate with something like stylelint too…
@paragateoslo
@paragateoslo 8 ай бұрын
Use css modules with npm packages like classnames or clsx and you basically have stylex only without the redundant css in js stuff.
@SimonCoulton
@SimonCoulton 8 ай бұрын
@@paragateoslo true, but there are definitely some rough edges around them too. Stylex looks like it may solve some of those, but guess we’ll just see how it progresses
@paragateoslo
@paragateoslo 8 ай бұрын
@@SimonCoulton Hmm what parts do you find painful?
@n8guy
@n8guy 7 ай бұрын
@@SimonCoultonthen if you want reuse, you can throw that in a global CSS modules file.
@_zetrax
@_zetrax 8 ай бұрын
I'm in love with vanilla-extract
@vellankiindeevar5530
@vellankiindeevar5530 8 ай бұрын
is this not same as unocss ?
@alec_sibilia
@alec_sibilia 8 ай бұрын
I feel like i've been using this syntax for years with MUI and I much prefer it to Tailwind. Pretty sure it's built on emotion... Glad to see FB making this a standalone lib that is also static. The DX of MUI's style system is top tier IMO
@lamhung4899
@lamhung4899 7 ай бұрын
MUI have deprecated the style object since v5
@alec_sibilia
@alec_sibilia 7 ай бұрын
@@lamhung4899 sx?
@ZAKARIABELHADJ
@ZAKARIABELHADJ 8 ай бұрын
I have just one question, like why the host is on vercel, and not on their servers! Like the meta has its servers!? Can someone respond to this!?
@paragateoslo
@paragateoslo 8 ай бұрын
How is this not just a worse version of css modules with the classnames package?
@artemeelemann317
@artemeelemann317 8 ай бұрын
This was present for a decade in material react mui and they deprecated this makeStyles as this is unusable. I dont see any benefit comparing to styled-components
@timseguine2
@timseguine2 4 ай бұрын
I have the same problem with this as I have with tailwind. I violates the style/markup dichotomy. That sounds like an overly philosophical hill to die on, but the thing is, most of this stuff is an entirely unnecessary complication. I understand why people think they need it. Component frameworks lead to monster doms that are pretty much impossible to style with css the way it was originally intended. And people vastly overuse class based styling. But the problem isn't css, it's the monster doms. If you have halfway sensible markup, SASS is the only CSS extension you really need in my opinion. Can you get that with a component framework? Yes but you have to care about being efficient with your markup.
@dyunior
@dyunior 7 ай бұрын
In TailwindCSS, CSS is the base knowledge, nothing more, except for the class names lol. Go to vacation and get back after 3 weeks, you likely dig again to MUI docs for reference or similar framework, It just too much of "cognitive overhead". To add, once the framework updates there are more to dig in to docs. Here's my top 2: 1. TailwindCSS for the win. 2. Styled-components
@siduck_og
@siduck_og 8 ай бұрын
i like unocss, its plugins shorten a lot of styling!
@eZU4nQsWN9pAGsU38aHj
@eZU4nQsWN9pAGsU38aHj 8 ай бұрын
This just looks like we are back to regular css but with extra steps.
@emondoraon
@emondoraon 8 ай бұрын
I think this is the same think as Griffel which used by React FluentUI.
@lucabaxter4002
@lucabaxter4002 8 ай бұрын
twin macro ? i'll never go back to write regular css again, so much time consuming. Stylex seems to go back in time.
@AndreasWalter1984
@AndreasWalter1984 8 ай бұрын
Why not just use css? Because we found a way to make it more complicated. 😂 I found I dump to write html in js and now this.
@mhamendes
@mhamendes 8 ай бұрын
The implementation looks exactly like MUI v4 makeStyles
@jordancutler7552
@jordancutler7552 8 ай бұрын
You can do this pattern with emotion CSS already: const classes = { myClass: css` color: red; `, myConditionalClass: css` color: blue; , } return ...
@EAlexHaywood
@EAlexHaywood 8 ай бұрын
Lol right, I was gonna say this just looks like Emotion-lite.
@thenightguy6816
@thenightguy6816 8 ай бұрын
Probably will see some people use both tailwind and stylex.
@WatashiwaWatashi-zw7hy
@WatashiwaWatashi-zw7hy 2 ай бұрын
I personally still love Tailwind instead. This library is great but at this time, I don't need it for my project. but maybe it would be different when react-strict-dom stable
@nooalovern
@nooalovern 8 ай бұрын
This is just CSS with extra steps.
@MrXperx
@MrXperx 8 ай бұрын
How is this dress is this different from JSS.
@Lorofol
@Lorofol 7 ай бұрын
Isn't this basically how react-native stylesheets work?
@johnevansolanoy
@johnevansolanoy 8 ай бұрын
So its Unocss?
@dahahaka
@dahahaka Ай бұрын
Is this all just about not shipping css that you aren't using? I still have a hard time understanding the advantage of any of this over vanilla css (or rather SASS), i do absolutely hate when i see stuff like telerik ui shipping literally with 5mb's of CSS, but i feel like that should be avoidable with some common sense no?
@blackalex191
@blackalex191 8 ай бұрын
Isn't this similar with styled-components?
I Parsed 1 Billion Rows Of Text (It Sucked)
39:23
Theo - t3․gg
Рет қаралды 33 М.
Responding To The Tailwind Conspiracy
37:25
Theo - t3․gg
Рет қаралды 74 М.
Climbing to 18M Subscribers 🎉
00:32
Matt Larose
Рет қаралды 30 МЛН
IS THIS REAL FOOD OR NOT?🤔 PIKACHU AND SONIC CONFUSE THE CAT! 😺🍫
00:41
MEU IRMÃO FICOU FAMOSO
00:52
Matheus Kriwat
Рет қаралды 13 МЛН
Why doesn't Facebook use git?
20:07
Theo - t3․gg
Рет қаралды 182 М.
This UI component library is mind-blowing
8:23
Beyond Fireship
Рет қаралды 592 М.
STOP Using 'style' in React
4:13
Youssef Benlemlih
Рет қаралды 2,4 М.
The Truth About Facebook's "Tailwind Killer"
6:48
Josh tried coding
Рет қаралды 42 М.
Pretty much every website uses the wrong font size…
15:33
Theo - t3․gg
Рет қаралды 63 М.
7 ways to deal with CSS
6:23
Fireship
Рет қаралды 1,1 МЛН
I Waited 3 Years For This Router. It STILL Blew My Mind.
21:30
Theo - t3․gg
Рет қаралды 96 М.
5 Mods Nintendo wishes were Illegal
12:47
Linus Tech Tips
Рет қаралды 430 М.
HTMX Sucks
25:16
Theo - t3․gg
Рет қаралды 97 М.
Should You Use Tailwind CSS?
7:47
Web Dev Simplified
Рет қаралды 350 М.
Мечта Каждого Геймера
0:59
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 1,5 МЛН
One To Three USB Convert
0:42
Edit Zone 1.8M views
Рет қаралды 440 М.
Samsung S24 Ultra professional shooting kit #shorts
0:12
Photographer Army
Рет қаралды 24 МЛН
МОЩНЕЕ ТВОЕГО ПК - iPad Pro M4 (feat. Brickspacer)
28:01
ЗЕ МАККЕРС
Рет қаралды 84 М.
Телефон в воде 🤯
0:28
FATA MORGANA
Рет қаралды 738 М.