Blog
Posts on varying subjects that derive from the happenings at Softorage
Migrating from Bootstrap to Tailwind CSS plus daisyUI
I recently migrated Softorage from Twitter Bootstrap (TWBS) to Tailwind CSS + daisyUI (T+D). It was a pretty big exercise, which not just changed the HTML classes, but also DOM structure and consequently JavaScript code.
TWBS often uses data-content HTML attribute for content, like in case of popover and tooltip, whereas T+D uses a simple div structure for such cases with optional data-tip attribute for tooltips. If you have to manipulate data-content in JS, you often have to use hacks and ways that may not always result in a simple, readable JS code. In my opinion, the T+D combo makes DOM into a simplified, easy to understand structure that is easy to work with in JS. For the majority of part, the JS logic and templating logic for T+D turned out be more readable as well, when compared to TWBS. There were also some performance improvements here and there.