8 news for css
September 2024
Replacing React code with CSS :has selector
Why use javascript when we can achieve the same result in css ? The new :has selector allow to define css rules according to properties from another element (works both for child or parent ones, no matter the level). This seems very powerful and could save a lot of javascript headaches and states.
September 2024
CSS: Scroll Driven Animations
I must admit, i never really use scroll animations mostly due to its complexity. This podcast full of examples and demos just shows how amazing animations you can make with css. And its not that complicated, so be sure to take a look.
May 2024
A flexbox trick to improve text wrapping
What flex properties to use to have several buttons with different textes always having the same size ? A very elegant answer without media queries, just using flex and min-width.
May 2024
Version 2.0 for Headless ui
Headless ui is an unstyled component library totally. It provides the logic and interactions, but let the developers style by themselves the components. It is a great tool to mix with tailwind to easily build design systems. Only compatible with React for now, but it should also supports vue soon.
April 2024
Tailwind is working on signals
The famous CSS library is working on implementing signals. It will allow to set and use states in our css to automatically update styling in several elements. We can see that of an evolution of the group functionality without its downsides.
March 2024
Tailwind announces new V4 version in alpha
Performance improvements (up to 10 times faster) by rewriting part of the framework in Rust, over 35% reduction in package size by dropping PostCSS for a custom parser reducing parsing time by half.
March 2024
Why I Pick ShadCN and Tailwind for all my projects
A brief overview of the different ways to style CSS in a React project and opinions on each.
February 2024
No Outer margin
The old debate margin vs padding. Why today you shouldn't use margin anymore and how to define your spacings only with padding (spoiler alert: border-box and gap will become your best friends)