3 ms·
The overall sentiment of this approach is valid, but there are some tweaks to it that I've found effective. Rather than using Tailwind, applying BEM syntax to
by magnus-hanso 3y ago
The overall sentiment of this approach is valid, but there are some tweaks to it that I've found effective.
Rather than using Tailwind, applying BEM syntax to styles in an inverted-triangle style has been good for existing websites where using Tailwind isn't an option. Especially if the code has very clearly defined components.
Instead of inlining the JS, I'll still keep that all pretty separate from the HTML. That's probably the thing I disagree with the most here. Maybe very simple things could be used this way-Might be a case-by-case decision there. It's also nice to write a few JSDoc comments to help bring some TypeScript-ness to the table.
I like the push for being more View-Source friendly. My work pushes for squeezing out as much performance as possible on a site, but even we have found that build steps for things like minifying/concatenating has diminishing returns compared to the overall workflow overhead when there is probably an image on the page that could be trimmed down.
Like what a lot of people have said here, I think much of it comes down to what you are building, too.