Side note, for nostalgia, here is the HN posting on it from 10 years ago: https://news.ycombinator.com/item?id=2904355
Except you'll build a framework. You'll add a bunch of classes for frequently used elements (nav, modals, buttons, etc), SASS variables, etc
They can't Google how to do something in your framework. They can't find component libraries that extend your framework. They probably can't find sandboxes that demonstrate every single one of your framework's use cases. The documentation of your framework is also likely to be worse than that of frameworks that have had tens of thousands man hours be put in their development and tens if not hundreds of thousands more battle testing them in production across a variety of projects.
The difference is instead of having your style in a single language (css) in a cohesive system, you have styles in both css and bootstrap and they often clash.
For example, in Bootstrap and other frameworks you'll always have JS components as well, for non-trivial concerns, such as providing carousels, lightbox functionality, tooltips, collapsibles, tabs and so on. Not using any of those will mean having to write your own from scratch, which will only make the aforementioned problems worse. Sure, you could probably figure things out without too many problems if it was just CSS, but it never is.
Sure, you'll need custom styling on top of all of those anyways in most cases, but i'd argue that it's harder to screw that up and therefore most teams should just stick to the already tested and established solutions out there, like building atop Bootstrap or others.
I do want to reuse these, i just dont want to have to override the shitty style that comes with them that clashes with my design anyway. Also bootstrap for example doesnt do all of these so you would have to use yet another 3rd party library on top of bootstrap. Bootstrap is useless to me, but I’m not against component libraries in general.
Bootstrap does provide most of those:
Carousels - https://getbootstrap.com/docs/5.1/components/carousel/
Tooltips - https://getbootstrap.com/docs/5.1/components/tooltips/
Collapsible - https://getbootstrap.com/docs/5.1/components/collapse/
Tabs - https://getbootstrap.com/docs/5.1/components/navs-tabs/
For lightbox functionality, you'd indeed need an external plugin (or just combine modal + responsive image), but i see the fact that such plugins are even available as a plus, since that means being able to download one and start using it, without spending days or weeks developing low level functionality.I think that the difference here is that you seem to prefer to focus on the design part a lot more (which is valid in projects where the brand is front and center), whereas i care more about implementing functionality quickly and prioritize that. For the latter case, Bootstrap works nicely. Probably less so for the former.
I try to do this for my own projects but there's gravitational pull toward frameworks in companies.
Its all well and good saying that, as long as you do not value your time.
Personally, I would rather use a reasonably up-to-date framework such as Bootstrap 5 because Bootstrap has already taken care of the majority of those CSS hacks that are often required to make things look right on various browsers.
And frankly, why re-invent the wheel ? Most "utilize modern css and js directly instead of relying on frameworks" likely ends up looking like "a lot of boilerplate with a few customisations". So why not use Bootstrap for all the boilerplate and spend your time more productively by focusing on the customisations ?
P.S. JS is not a strict requirement for Bootstrap, it can be used CSS-only. But one added benefit of Bootstrap 5 in particular is they've removed the jQuery dependency.
Making any large front end application WITHOUT a framework or a view library is just a bad idea, even today. There is nothing in the DOM or spec-wise that is equivalent to the power of React or Vue, period.
When it comes to CSS, the situation is better. Flexbox, CSS grids, ... have made creating CSS layouts extremely easy. So CSS kind of successfully brought in a lot of things that were directly exploitable by front-end developers.
To this day, HTML and the DOM are JUST NOT RAD for complex UI, period. Web components have a few nice ideas but a lot of flaws (especially support on IOS). Whether you build your own framework or use someone else library, you will absolutely need something that sits on top of the DOM for large front-end applications.
So it's not by choice that most front-end devs have to rely on a framework. It's because the standards are not good enough.
> I try to do this for my own projects but there's gravitational pull toward frameworks in companies.
A simple example. you need a mechanism to manage the life cycle of event handlers on your page, if your app uses the history API. If you do so then you've already started writing your own framework.
Web components failed to address a lot of stuff developers use view libraries for. That's why it is not that popular.
A negative effect of all these frameworks is that I work with more and more frontend devs that just don't know their way around (S)CSS, so if you throw them into a project that uses a framework they don't know or (gasp) hand-crafted CSS they are completely lost. Same thing with Javascript tooling btw, in a recent project a frontend dev wanted to rewrite the whole codebase because he was not familiar with Webpack and only knew vite (which is the new cool thing it seems), so he wasn't able to work with the existing code.