Magic-Stylez

SourceCode

magic-stylez

Some style helpers used in a lot of our apps.

Warning

This Gem is still work in process!

Its just the start to outsource my style framework (I mostly rebuild for every app).

It is mostly driven by my own habits, so I don't know if its usefull for others.

Dependencies

(both are allready included)

Usage


add the gem to your applications gemfile

gem "magic_stylez"

run the generator

$ rails g magic_stylez:install

add to stylesheets

SASS:
  @import 'magic-stylez'; // import all
  @import 'magic-min';    // import basic
CSS:
  //= 'magic-stylez'; /* import all */
  //= 'magic-min';    /* import basic */

add to javascripts

  //= 'magic-stylez'; /* import all */
  //= 'magic-min';    /* import basic */

NEWs


rail-ujs.js file optimized for splitted and divided buttons

//= require magic/ext/rails-ujs

magic-styles update generator

in the process I often add new variables to the corporate files

what causes "Missing variable!" when you update to new version

this generator adds all new variables without touching your settings

$ rails g magic_stylez:update


Changes when update to 0.0.0.83:

Text-Colors now only usable as:
.color-name-clr /or/ .color-name-color /or/ .color-name-txt /or/ .color-name-text /or/
.clr-color-name /or/ .color-color-name /or/ .txt-color-name /or/ .text-color-name

Old style: .color-name is removed !!!


Changes when update to 0.0.0.78:

  • add divider variables in corporate/varriables!

Dividers are completely rewritten and now have transparent backgrounds, so you can place them on any element.
Also some variables added:

  • $divider-horizontal-spacing, $divider-vertical-spacing => spacing
  • $divider-top-color, $divider-bottom-color => line-colors for .divider and hr

If you update to >= 0.0.0.78 be sure to run: $ rails g magic_stylez:update !!!


Changes when update to 0.0.0.67:

  • changed some names in corporate/varriables!

With Version 0.0.0.67 Sections have more bootstrap like name, like .section.section-xs instead of .section.compact.
Also some variables changed, so $section-flatted-padding becomes $section-sm-padding.

If you update to >= 0.0.0.67 be sure to run: $ rails g magic_stylez:update !!!


Changes when update to 0.0.0.55:

  • corporate/typo is removed!
  • corporate/fonts doesn't contain css, just variables

With Version 0.0.0.55 I merged corporate/typo into corporate/fonts (they where so similar). I also removed all css from corporate/fonts, because it causes trouble with update generator (and also is not a variable).

On to / To Do


update gem to work with new bootstrap structure (outside vendor folder)

npm & bower compatiblity

small paralax plugin to fix fixed-background problem on chrome

optimize code, variables

clean up unused or double css

learn english :)

improve documentation

Thanks

A lot of code for this gem is taken from bootstrap-sass, so thank you guys for the great work.

Same goes for bourbon thanks for a lightweight helper set.

Also thanks to all the people, how share their knowlegde on stackoverflow.

Authors

License

MIT-License

© 2014 Torsten Wetzel (berlinmagic UG)