News for hackers. Stuff that matters.
Re:StyleX – Meta's styling library by willsmith72 on Tuesday December 05, 2023 @11:05PM (#38540376)
e.g. using mui sx. the downside is the runtime performance cost

https://mui.com/system/getting-started/usage/#performance-tr...

i don't want to reuse or compose my styles, i just want to add alignSelf: 'flex-end' and then easily be able to change it and see the styles in one place, without leaving the component definition. the reusability and composition is at the component level

Re:StyleX – Meta's styling library by cantSpellSober on Wednesday December 06, 2023 @07:43AM (#38543095)
Thanks! Great reason this beats MUI.

Not trying to hate on atomic CSS, we've had composable classes and style tokens for a long time, they work well. Even one of the devs on this project commented on them here:

> We don't think the Tailwind way of styling is readable in the long term, but we see the value is being able to author that way

https://news.ycombinator.com/item?id=38540629

The docs here mention the downsides though.

Re:StyleX – Meta's styling library by willsmith72 on Wednesday December 06, 2023 @09:23AM (#38544233)
> Great reason this beats MUI.

Not at all, mui gives you the option to do either.

I don't want my style library being opinionated about my coding style.

Re:StyleX – Meta's styling library by cantSpellSober on Wednesday December 06, 2023 @11:45AM (#38546268)
Ohh I see, I honestly didn't click the first time. You meant sx in MUI, not StyleX. We're gonna need more names.