I've been looking for ways to efficiently override Bootstrap CSS. I've seen a number of questions and their answers, two notable ones being the following:
But I don't believe they address my specific use. I'd also appreciate a critique of my thought process, and if it's even worth the effort. Here goes.
Here's what I'd like to be able to do:
- Use Less/Sass to take advantage of Bootstrap's builtin variables and make framework-wide changes such as the navbar height or the collapse breakpoint. These are very difficult to do with CSS, but very easy to do with Less/Sass, so you can see the advantage here.
- Use Bootstrap via CDN. Many benefits to this, from performance to reliability.
- Link to (host) a single stylesheet that includes my only my changes. This reduces file size as well as CSS redundancies, keeping only the necessary overrides. It also improves performance for both the client and server.
If I were simply to edit the Less files and recompile them, I'd basically be hosting Bootstrap myself, no need for a CDN. But if I hosted Bootstrap via CDN and only hosted my own changes, the only way I know of accomplishing this is with plain CSS, thus losing the advantage of Less variables.
Thoughts?