Over the weekend, I tried a small experiment and built an npm package called SetCSS. I’ve been curious for a while how tools like Tailwind actually work under the hood, so I decided to try building a runtime version of it myself. Instead of generating CSS at build time, it parses class names from the DOM and injects styles dynamically using JavaScript. Under the hood, it’s basically: DOM traversal → class-to-style mapping → style injection via <style> tags. It’s still a POC, but building this gave me a much clearer understanding of the trade-offs between build-time vs runtime styling, and how closely DOM, rendering, and styling are connected. npm package: https://lnkd.in/d8MWYNEm #javascript #nodejs #webdevelopment #frontend #npm

So good to see this Sharvi Belsare Always keep exploring! Never settle.

To view or add a comment, sign in

Explore content categories