Skip to content

Update to Bootstrap 2.2 #77

itmustbe opened this Issue Oct 30, 2012 · 11 comments

6 participants


I think many of us using Yeoman are excited about the recent Bootstrap v2.2.0 update!

Though it would be good to wait until the Carousel bug is fixed here, as that's kinda big if you're using that component: twbs/bootstrap#5688


So now that carousel bug is fixed it'd be great to have an update to Bootstrap v2.2.1 :)


Yeah! On my fork I included the following quick-and-dirty conversion tip. This could be useful for an upgrade.
But first, go though all the SCSS bootstrap functions and prefix them with ctb fx, in order not to cause naming conflicts.
Has anyone done this prefixing successfully and found a good (and safe) way to do it?

SCSS to SASS Conversion tip

To easily convert .scss files to .sass files you can use this little bash script:

$ for f in *.scss; do sass-convert -F scss -T sass $f ${f%%.*}.sass; done

To convert all twitter bootstrap .scss files to .sass (with overwrite):

$ for f in stylesheets/compass_twitter_bootstrap/*.scss; do sass-convert -F scss -T sass $f stylesheets_sass/compass_twitter_bootstrap/${f%%.*}.sass; done

$ for f in stylesheets/*.scss; do sass-convert -F scss -T sass $f stylesheets_sass/${f%%.*}.sass; done

Please also see:


PS: Note that font-awesome if provided by several other gems out there.

wyuenho commented Nov 1, 2012

Converting from SCSS <-> SASS is not the problem, the problem is finding an automatic way to convert from LESS to SCSS without any manual fixing. Back when LESS was written in Ruby, sass-convert was able to convert from LESS to SCSS. That option is now gone.

Converting from LESS to SCSS is actually non-trivial, mixins, parent referencing, and loops have behavior in LESS that can't be mapped 1 to 1 to SCSS behavior.

I wonder now if having LESS compile your customized Bootstrap into CSS and then include it with and @import in SCSS would be easier than trying to keep up with Bootstrap's release cycle.

At the very least, font-awesome should be dropped from this plugin I think, it doesn't track Bootstrap closely enough.

itmustbe commented Nov 1, 2012

I realize it's a non-trivial task, "converting" from LESS to SCSS. Prior to Yeoman I was using LESS for Bootstrap (even though I much prefer SCSS), and I was able to update Bootstrap within a couple days of each new release. I did this by customizing only Bootstrap's variables file, and taking the route of overwriting all other BS with my own SCSS files (named along with BS naming conventions).

Once Yeoman was released, however, I went this new route (using this repo's SCSS port). I'm regretting it a bit, thought it's not too difficult to change back to how I was doing things. I'm a little concerned about using a "port" at all, given it opens the possibility to introducing new bugs not in Bootstrap itself; also the timeliness of updates is definitely an issue. I'm not trying to complain here though! I realize it's not a quick thing to do, or I'd do it myself ;)

Basically, I too am wondering about the viability of an SCSS port of Bootstrap long-term?

wyuenho commented Nov 1, 2012

Yeah I manually ported all Bootstrap's LESS files over to this port twice and introduced a few bugs along the way. I kind of regret using this port now as well. It's the best port so far but the maintainer understandably isn't updating it quickly enough and all these other pull requests and forks have problems of their own.

I think the once and for all solution for an SCSS port of Bootstrap hinges on a real LESS <-> SCSS converter. I'd write it if someone could help me set up a Kickstarted project and get it funded. I don't have the time and money to do it for free :(

Honestly, the whole point of SCSS is to have tools like Compass to exist. I can't live without it now. It would be nice if Bootstrap could fit in there somewhere tho.

vwall commented Nov 1, 2012

There is no need for a SCSS to SASS convert. It's only in this repo to test the LESS to SCSS converter in the build folder. I had a really nice upgrade for this build script and then I upgraded to Mountain Lion and lost it...

Work has calmed down so I hope to be able to maintain this. I do love PULL requests though!

wyuenho commented Nov 1, 2012

Short of writing a full convert from LESS to SCSS, maybe some clever hacks can be done to convert LESS to SCSS while taking care of these differences in this gist.

On the other hand, I wouldn't mind if someone port Compass over to LESS :P

travisp commented Nov 29, 2012

Is there some way we can make use of this project instead?

It's an attempt to be a 1:1 translation from Less to Sass for bootstrap and is up to 2.2.1 currently.


Version, released January 15th, upgraded to Bootstrap 2.2.2, so this can be closed. @vwall Happy to try to pitch in keeping the tracker clean if it would help.

vwall commented Jan 27, 2013

Help is always appreciated.

@vwall vwall closed this Jan 27, 2013

Cool, you got it. Don't I need commit to be able to close tickets though?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.