Frage

I was hoping to use the new version (v4) of Foundation for a responsive project I'm working on so I installed v4 via gem install zurb-foundation the other day and got CodeKit up and running with it. However, my client has asked that we support IE8 (God help me) because we still have a significant amount of traffic showing up in analytics.

Version 4 of Foundation doesn't support IE8 because its Mobile-First. V3 works differently and can still support IE8.

So i'm trying to figure out how to back track. I installed the latest V3 Foundation GEM via gem install zurb-foundation -v 3.2.5 but I am not sure how to force CodeKit + Compass to use V3 instead of V4.

Also, when I set up my new project with V4 I had created a COMPASS project in CodeKit and then via the terminal followed this commands to build the Foundation framework in the new Compass project folder:

1. Add require "zurb-foundation" to your config.rb file
2. cd path/to/your-project
3. run compass install foundation

So now that I have GEMS for v3 and v4 in my system, how can I just work with 3 for this project and set up the folder similarly.

Any help is GREATLY appreciated. I'm fairly new to using CodeKit + Compass + SASS, so be gentle and feel free to be as verbose as you like :)

War es hilfreich?

Lösung 2

Config.rb in a foundation project is a simple ruby environment file, so selecting the version of zurb-foundation is the same as requiring a specific version of any other gem.

gem 'zurb-foundation', '=3.2'
require 'zurb-foundation'

Andere Tipps

Dave, I struggled with this for a long time before I had the time to take a break from work to figure it out. At times I'm using Foundation 2, 3 and 4 on different projects. Best thing I found was to use bundles. After finally figuring it out though I found this article on ZURB's docs Goto section Running multiple versions

First, if you don't have bundler installed yet run gem install bundler

Now say for instance I'm creating a new compass zurb-foundation project 'flowershop'

create the directory flowershop mkdir flowershop && cd flowershop

create a new file Gemfile with the contents

source "https://rubygems.org"
gem "zurb-foundation", "4.0.9"
gem "compass"

you could also use any other version here. Foundation 2 for example:

gem "ZURB-foundation", "2.2.1.4"

then run the command bundle install, it should then install those gems for you then you can run all your compass commands prefixed with bundle execute.

So to create a new compass project with foundation run

bundle exec compass create . -r zurb-foundation --using foundation

and then to watch your new product you again prefix the compass command

bundle exec compass watch .

Personally, I like using the alias I created for becw to bundle execute compass watch

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top