I am looking in to choosing an appropriate CSS framework (am new to it) - currently thinking of
bootstrap/foundation. I was wondering if could give an idea on how easy is it / what would be required to switch between frameworks? How easy is it to switch between them or to another CSS framework, assuming:
that just the CSS part is used (i.e. no jquery/javascript)?
the jquery/javascript is used?
I’m thinking if you have a more lightweight framework with fewer classes, this may lock you in to the
framework less than say a framework with lots of classes such as Bootstrap - but I may be wrong?
if they’re integrated within a JS framework such as Angular?
Thank you v. much for reply.
I was wondering if you’d expand a little your answer, possibly with an example.
I was comparing 1 or 2 components of Foundation and Bootstrap (see below). Most of the differences seem to be in the styling (you might disagree) most of which I’ve omitted. The 2 HTML structures although not the same seem very similar.
Possibly more complex examples may differ more. The XYGrid (if use grid-x) and BS Grid seem similar.
regards…
The first question is why you think you need a framework?
The need for a framework depends on what you are going to build and who is going to build and maintain it.
If the reason for using a framework is because lack of experience in CSS then you could find a framework harder than building it from scratch if you don’t simply use all the standard template structures etc. Once you veer away from the norm then you need a good understanding of the framework in question and a good understanding of CSS/html as well.
Which framework you use (bootsrap/foundation etc) will also again depend on what type of things you need to support as some have everything included and some are minimal. You cannot usually switch between the two so choose one and then learn it well.
I’ve used bootstrap on very large projects and it works well on a team structure where everybody sticks to the rules. However as soon as someone with little experience starts tinkering with it they tend to break it badly and need me to fix it for them.
For my own small projects I would never use a framework as I don’t want the code bloat and can code a site before someone has even loaded all their dependencies. However, If you are reasonable with CSS/Html but want the security of a framework then some people do find it useful as it handles a lot of the bugs you may find in certain browsers (although this is less of an issue today).
I would also advise against using any current frameworks that do not support flexbox. If the framework is still using floats then don’t touch it with a barge-pole unless you are actively supporting older browsers.
Think of a framework as a tool and not a crutch and then decide if its the right tool for you.
There is no right one answer other than whatever you choose you must learn it well and understand the basic concepts of css/html/js.