← Back to Upcase

What are mixins?

(Jameson Trinker) #1

What exactly is a mixin? When are they used and what are they used for? They’re referred to often in the intermediate rails workshop regarding view helpers. But I’m also using Foundation and it seems like there are quite a few mixins available between foundation and rails.

Are foundation’s mixins defined the same way as rails’?

Thank you!

(Ben Orenstein) #2

I think you might be confusing two different concepts with the same name.

Ruby mixins are described here: http://www.ruby-doc.org/docs/ProgrammingRuby/html/tut_modules.html

Mixins in Foundation (which I think are SASS mixins), are a bit different. Documentation on them is here: http://foundation.zurb.com/old-docs/f3/sass-mixins.php