zurb/foundation-sass — Issue #18: misc optimization / configuration
Author: brentkirby
Created: 2012-01-15 06:16:29+00:00
State: open

First off, I really dig this framework, we focus on doing design in the browser, and this helps speed up initial prototyping considerably :) Thanks for all the hard work.

Have you considered converting some of the styles / colors / options to utilize mixins and variables more? For instance, things like buttons etc have "hard coded" styles for colors like blue/red/black etc. While those are certainly handy, the resulting css could be better optimized utilizing a button 'base' for the layout and maybe adding a mixin or function to only create classes used in the final stylesheet. Perhaps something like:

``` sass
$button-colors: (blue #00a6fc) (red #e91c21)
```

Where you could then generate the button classes based on each member of the list.

Another thing (and I saw a couple others posted similar issues) would be breaking out various portions of code into additional partials. One good example is forms... where right now theres just a _forms.sass that includes the default, "nice" forms, and "custom" forms. To cut down on the resulting css you could split this into 3 separate partials and let the user decide which to use. I'd imagine that most of the time only one format would be used (since you would want consistency) so that could also remove some of the extra css.

Theres a couple other items like that in there ( the hide on mobile/desktop/etc stuff, which, if using in a dynamic site should really be handled programmatically ) that could benefit from some extraction too.

I'm more than happy to help out a little with the above too (I've already started some of it on a separate fork for personal use), I just figured I'd bring it up and see if you guys had any opinions one way or another about it :)

Have you considered merging the sass and rails versions together? That may make it easier to maintain (you'd only have a single gem), and its easy to tap into the Rails 3.1 pipeline if its available, use compass if not, or even as a standalone without compass.