oddbird / susy

Pre-grid responsive layout toolkit for Sass, now deprecated
http://oddbird.net/susy/
BSD 3-Clause "New" or "Revised" License
3.87k stars 348 forks source link

New repository with removed helpers? #14

Closed jamiehodge closed 13 years ago

jamiehodge commented 13 years ago

Hi Eric,

Would you please create a new repository with the helpers you removed (rhythm-borders, etc.)? I am currently using them and think they'd be useful for others.

mirisuzanne commented 13 years ago

Don't worry, those helpers haven't gone away. I use them too. They've just been moved to the compass core. Simply upgrade to Compass 0.11.beta.3 and Susy 0.9.beta.3, remove the 'susy' mixin, replace it with the 'establish-baseline' mixin, and you're good to go. See the changelog for details: https://github.com/ericam/compass-susy-plugin/wiki/Changelog

alexschomb commented 13 years ago

I'm not quite sure what to do now, even after your explanation. Is this the correct way?

Does removing from stylesheets/screen.sass (or print.sass, ie.sass and others) +susy and instead adding +establish-baseline make the total move?

Or do I also need to replace in _stylesheets/defaults.sass @include susy/reset with @include compass/reset ?

And after all if the susy mixin is really deprecated, how will Compass/SASS recognize which plugin to use? Blueprint, 960, Susy, ... Does it mean that in config/compass.rb the require "susy" line dictates the right behaviour? What if I'm using more than one plugin?

You also wrote in the Changelog that the _defaults.sass won't be created anymore. So would it be enough to just delete that file? Is compass/reset part of the new defaults that are being imported automatically? And how could I stop that besides overwriting the defaults on my own?

Well, that are lots of questions, but I don't want to forget to thank you for your great work!!

alexschomb commented 13 years ago

Alright one question got solved by myself by trying it out. I removed the _defaults.sass file and removed the mixin +susy. I also replaced @import defaults in screen.sass (and others) with @import base. It kinda works as long as my Gemfile says the following: gem 'compass', '>= 0.11.beta' gem 'rb-inotify' gem 'compass-susy-plugin', '>= 0.9.beta' gem 'compass-colors' gem 'haml', '>= 3.1.0.alpha' But the style is different. It's like the defaults of Susy did not get loaded. How can I get them to be included? I already found out _base.sass to @import suys/suys

mirisuzanne commented 13 years ago

The line in compass.rb is the only line you need to tell Compass that you are using Susy (among any number of other plugins). But "using Susy" has no meaning at all, besides giving you access to the Susy mixins. So you are only actually "using susy" if you use the Susy mixins. When a mixin moves from Susy to Compass core, you can keep using it with no worries.

Susy no longer includes a base mixin (by the same name), because all that mixin did was establish the baseline, and now there is a compass core mixin to take care of that.

You can remove the defaults if you want, but then you wont have the defaults. I've removed the defaults from new versions of Susy because I consider them outside the scope of what Susy should be, not because they will somehow get loaded automatically.

And yes, "susy/reset" should also be replaced with "compass/reset" - as the two are identical and the Susy one will be removed in the next release.

If you bring back your defaults and make the two changes noted (susy=>estabish-basline and susy/reset=>compass/reset) you should have all the old styles and everything you need working properly.

Hope that makes sense!

alexschomb commented 13 years ago

Thanks for your fast reply!

Now I understood what you meant, especially on the part of the defaults.sass_ file. So for me it is best to keep and edit it. I made the changes you suggested but there is one misunderstanding left for me. Sorry for being so dumb ;) As soon as I remove the following line from _base.sass (a file that I wouldn't need if I wouldn't use defaults.sass_) the mixins from Susy are not recognized anymore // Don't move this @import above the GRID and FONT-SIZE variables. @import susy/susy Here's the error output when the line/s above are removed (only first line): Syntax error: Undefined mixin 'container'.

alexschomb commented 13 years ago

Fun fact: Even the establish-baseline mixin is not recognized without those lines.

Here is the beginning of my _defaults.sass: @import base // default version without @import susy/susy @import "compass/reset" @import "compass/typography" @import "compass/css3" @import "compass/layout" @import "compass/utilities" +establish-baseline

And here a list of my used Rubygems: $ bundle list Gems included by the bundle: * abstract (1.0.0) * actionmailer (3.0.5) * actionpack (3.0.5) * activemodel (3.0.5) * activerecord (3.0.5) * activeresource (3.0.5) * activesupport (3.0.5) * arel (2.0.9) * bcrypt-ruby (2.1.4) * builder (2.1.2) * bundler (1.0.10) * chunky_png (1.1.0) * compass (0.11.beta.5) * compass-colors (0.3.1) * compass-susy-plugin (0.9.beta.3) * daemons (1.1.2) * devise (1.2.1) * erubis (2.6.6) * eventmachine (0.12.10) * ffi (1.0.7) * haml (3.1.0.alpha.147) * hpricot (0.8.4) * i18n (0.5.0) * mail (2.2.15) * mime-types (1.16) * mysql2 (0.2.7) * orm_adapter (0.0.4) * polyglot (0.3.1) * rack (1.2.2) * rack-mount (0.6.14) * rack-test (0.5.7) * rails (3.0.5) * railties (3.0.5) * rake (0.8.7) * rb-inotify (0.8.4) * ruby_parser (2.0.6) * sass (3.1.0.alpha.252) * sexp_processor (3.0.5) * simple-navigation (3.2.0) * thin (1.2.11) * thor (0.14.6) * treetop (1.4.9) * tzinfo (0.3.25) * warden (1.0.3)

mirisuzanne commented 13 years ago

you do need to keep the susy import line, as well as the default grid settings if you want to use susy for your grids. I'm not sure why it still thinks you need susy for the vertical rhythm stuff. If those are really the gems that are being used, you should be getting different errors.

alexschomb commented 13 years ago

Hm, hard to figure out, but as it was just for my own interest I simply believe in your words :) Thanks for your help!