Goober: A lightweight CSS-in-JS solution
Blog post from LogRocket
CSS was initially designed for styling web pages, but as websites became more complex, managing designs became challenging, leading to the development of component-based libraries like React and Vue.js. This evolution highlighted the need for modular solutions in CSS, resulting in CSS-in-JS libraries such as emotion and styled-components, which, despite their popularity, can significantly increase page load times due to their size. To address this, Cristian Bote created goober, a lightweight CSS-in-JS library that is less than 1KB, making it ideal for high-performance websites. Goober is compatible with various JavaScript frameworks and supports server-side rendering, media queries, and keyframes, among other features. Although it trails behind emotion in speed, goober outperforms styled-components and provides a viable alternative due to its small footprint, making it especially beneficial for websites with high traffic. The library's design allows for code separation, easy reuse of styles, and customizable CSS using props, with the added benefit of a growing community and developer support.