Include only specific files #113

ream88 opened this Issue Aug 16, 2012 · 10 comments


None yet
5 participants

ream88 commented Aug 16, 2012

Is there a way to only include specific files into my stylesheets?

For example:

@import 'bourbon/css3';

ream88 commented Aug 16, 2012

Ok, it seems that your implementation of modular-scale is in conflict with @scottkellum's modular-scale which is used by @zurb's foundation 3.0. Thats the reason for following problem:


Curious how you are using Burbon + Compass stylesheets in Foundation together. Plenty of great unique features in each but there are bound to be other conflicts.

ream88 commented Aug 17, 2012

I like the mixin position and other mixins which help with vendor

It would be super great to use both worlds in one Rails app of possible, as
you said, both projects have great unique features.

On 17.08.2012, at 13:19, Scott Kellum wrote:

Curious how you are using Burbon + Compass stylesheets in Foundation
together. Plenty of great unique features in each but there are bound to be
other conflicts.

Reply to this email directly or view it on

ream88 commented Aug 24, 2012

So there is no way to include only specific files?

Or is there a way to exclude specific files? i.e. don't import "functions/modular-scale" in Bourbon.

kerns commented Oct 12, 2012

To me this whole discussion highlights what I perceive as the downside of using Compass and Bourbon gems. I don't understand the advantage over just exporting or rync'ing from the latest git repo of a library.

This is not to say there are not advantages,...there must be, I'm just not aware of what they are yet.

To meet my own requirements, I really prefer having the actual files in my working directory. When shipping a project to a client, or to other team members by way of git, it's even more important that there exists a canonical version of all files being used to build the site.

To the point, if I don't want or need "functions/modular_scale", I go into sass/_bourbon.scss and remove the include.


plapier commented Oct 12, 2012

If you are using only one sass library, like bourbon, removing an import inside _bourbon.scss would not change the final output of your CSS. Because bourbon doesn't output anything unused to your final rendered CSS file, excluding specific mixins would provide no valuable gain.


plapier commented Oct 12, 2012

I wonder if we could build functionality where by default, all bourbon files are imported, but by setting a global variable: $bourbon-import-all: false, none of the bourbon files would be imported. Then you could therefore import specific bourbon mixins and function.

What I mentioned above is not feasible: nex3/sass#451

kerns commented Oct 12, 2012

@plapier True, I guess I was thinking more in terms of reserving conflicts that might arise from patchworked libraries like mine. Or just tailoring, cleaning out what you might perceive as kludge. But, still...good point.


plapier commented Nov 9, 2012

@haihappen @gesquinca @kerns: There doesn't appear to be a way to explicitly exclude specific imports, but after playing around with things, I've discovered you can actually include only specific files.

I don't advise going this route.

For rails projects, the Bourbon files are being pulled from the gem, which looks in the gem's ./app/assets/stylesheets/ directory. Usually we load the _bourbon.scss partial from here with @import "bourbon";, but instead you can load specific files like so:

@import "css3/transition";
@import "addons/prefixer"; // Most all mixins require this.

Basically, you can optionally import anything from Bourbon's stylesheets/ directory:

@plapier plapier closed this Dec 5, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment