waffleiron 0.1.2 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: c0b5a4b74ca655beb24689df2972c7e6a3fdc1dd
4
+ data.tar.gz: aadac013586cbe81562c82b4e14c393954260579
5
+ SHA512:
6
+ metadata.gz: 087ed6f9fa57d8bf008e3c7f831218e57d20a8f99541f06ccd85fd1a920f222d9e35f93d9a2174a1ad53aae6bcaeccaf8b07f541e6a8a1691c6c216dee8e3fd8
7
+ data.tar.gz: bbce9443471f6beebf22747bcd65c30bf063ab7d22d845873cdb2025605acf94c7e88f9143d9ce79982b0350c14189fc5111ea973369a6526304e42681d26296
data/README.md ADDED
@@ -0,0 +1,129 @@
1
+ # Waffleiron
2
+ Because waffles are delicious.
3
+
4
+ ===========
5
+
6
+ ## Installation
7
+
8
+ Do you take your waffles on Rails? Then use the latest stable release of
9
+ Rails with waffle iron.
10
+
11
+ gem install waffleiron
12
+
13
+ ## Use
14
+
15
+
16
+ Add this to the top of your application.css.scss file:
17
+
18
+
19
+ // waffleiron config - set these to match your grid
20
+ $wi-width: 940px;
21
+ $wi-cols: 12;
22
+ $wi-gutter: 20px;
23
+ $wi-stacked-width: 90%;
24
+ $wi-stacked-breakpoint: 499px;
25
+ // if you want IE7 support via HTML/body tag conditionals add the line below
26
+ $wi-ie7: true;
27
+ // if you want to turn off the responsiveness of Waffleiron set this to false
28
+ $wi-responsive: true;
29
+
30
+ @import 'waffleiron';
31
+
32
+
33
+
34
+ This will give you a row and elements that are 3 cols wide:
35
+
36
+ .element-wrapping-cols {
37
+ @include row();
38
+ }
39
+ .element-you-want-to-be-3-cols-wide {
40
+ @include col(3);
41
+ }
42
+
43
+
44
+ A real world example of this would be:
45
+
46
+ SCSS:
47
+
48
+ section {
49
+ @include row();
50
+ outline: 2px solid red;
51
+ .panel {
52
+ @include col(4);
53
+ outline: 2px solid blue;
54
+ }
55
+ }
56
+ HTML:
57
+
58
+ <section>
59
+ <div class="panel">
60
+ <h2>About Waffleiron</h2>
61
+ <p>Waffleiron is amazeballs, 0_o lol omg!!!11 one.</p>
62
+ </div>
63
+ <div class="panel">
64
+ <h2>Download Waffleiron</h2>
65
+ <p>Click the download Waffleiron button hidden somewhere on this page.</p>
66
+ </div>
67
+ <div class="panel">
68
+ <h2>Help Waffleiron</h2>
69
+ <p>If you have an awesome idea for Waffleiron, git on github and do some stuff.</p>
70
+ </div>
71
+ </section>
72
+
73
+ Which would give you something like this:
74
+
75
+ ![demo](https://github.com/ajaswa/waffleiron/raw/master/demo/demo.png)
76
+
77
+ ### Other options
78
+ With the col() include you can specify two other parameters. After the number of columns you want to can add prepend and append numbers.
79
+
80
+ @include col(2, 1, 4);
81
+
82
+ This will give you an element two columns wide, prepended by one column and appended by 4 columns.
83
+
84
+ ## What is Waffleiron?
85
+ Waffleiron is a "semantic" non-intrusive grid system powered by SASS/SCSS. No floats, no extra classes and no non-sense. It just works.
86
+
87
+
88
+ ### What? No floats?
89
+ Inline block is your new friend, friend. No floats mean that you don't have to clear them.
90
+ ### No extra classes
91
+ Pssh! No .col-06? No .fivecol? That's unpossible!
92
+ The trick here is to use semantic markup and CSS for all you elements.
93
+
94
+ ### Responsive by nature
95
+ Built into Waffleiron are some handy helpers to get your site all responsive. At a given point it will drop to a fluid layout and then down to a mobile layout. Turn them off if you would like.
96
+
97
+ ### Drop in grid
98
+ Drop Waffleiron in where you need a grid. Leave it out where it doesn't make sense. Write your CSS as fast as you can.
99
+
100
+ ## Why should I use it?
101
+ Cause it's awesome and fast. If you don't want to use it half way through a project you can easily pull it out and write your own CSS without needing to rewrite your markup or change your CSS.
102
+
103
+ ## Support
104
+ Waffleiron works without any hacks in Safari, Chrome, Firefox and IE8+. If you use html tag conditionals IE7 support is built in, otherwise you'll have to tweek some things by adding the following to your config block:
105
+
106
+ $wi-ie7: true;
107
+
108
+ ## Ok I'm convinced
109
+ 1. Use SASS/SCSS
110
+ 2. Download the grid file
111
+ 3. Write your markup semantically
112
+ 4. Add the Waffle mixins to your scss
113
+ 5. Enjoy a flexible grid that you can drop in where you want.
114
+
115
+
116
+ ## Issues
117
+ 1. You must minify your HTML ( Since we use inline-block )
118
+
119
+ Wafflecoptor:
120
+
121
+ wafflewafflewafflewaffle
122
+ waffle waffle
123
+ wafflewaffle waffle
124
+ wafflewafflewafflewafflewafflewaffle
125
+ wafflewafflewaffle
126
+ wafflewafflewaffle
127
+ wafflewaffle
128
+ waf fle
129
+ waffle waffle
@@ -10,6 +10,7 @@ $wi-stacked-width: 90% !default;
10
10
  $wi-stacked-breakpoint: 499px !default;
11
11
 
12
12
  $wi-ie7: false !default;
13
+ $wi-responsive: true !default;
13
14
 
14
15
  $wi-fluid-start: #{$wi-width - 1};
15
16
  $wi-fluid-end: #{$wi-stacked-breakpoint + 1};
@@ -51,12 +52,20 @@ $wi-col-width: $wi-width / $wi-cols;
51
52
  width: $large-width;
52
53
  }
53
54
  }
55
+
56
+ test-for-margins {
57
+ expect: to-equel(margin-math(1), $var);
58
+ }
59
+
60
+ @function margin-math($n) {
61
+ @return ($wi-col-width * $n) + ($wi-gutter/2);
62
+ }
54
63
  // prepend and append do the same math but they are dependent on a number being passed in.
55
64
  @mixin prepend($n: 1) {
56
- margin-left: ($wi-col-width * $n) + ($wi-gutter/2);
65
+ margin-left: margin-math($n);
57
66
  }
58
67
  @mixin append($n: 1) {
59
- margin-right: ($wi-col-width * $n) + ($wi-gutter/2);
68
+ margin-right: margin-math($n);
60
69
  }
61
70
  @mixin width($n: 1) {
62
71
  width: ($n * $wi-col-width) - $wi-gutter;
@@ -65,7 +74,9 @@ $wi-col-width: $wi-width / $wi-cols;
65
74
  width: $wi-width;
66
75
  margin-left: auto;
67
76
  margin-right: auto;
68
- @include responsive-row();
77
+ @if $wi-responsive {
78
+ @include responsive-row();
79
+ }
69
80
  }
70
81
  @mixin col($col: 1, $offset: 0, $append: 0 ) {
71
82
  // $col = width in cols
@@ -91,5 +102,7 @@ $wi-col-width: $wi-width / $wi-cols;
91
102
  @else {
92
103
  margin-right: $wi-gutter/2;
93
104
  }
94
- @include responsive-col($col, $offset, $append);
105
+ @if $wi-responsive {
106
+ @include responsive-col($col, $offset, $append);
107
+ }
95
108
  }
@@ -0,0 +1,5 @@
1
+ require 'sass'
2
+
3
+ module Waffleiron
4
+ Sass.load_paths << File.expand_path('../../app/assets/stylesheets/', __FILE__)
5
+ end
@@ -0,0 +1,3 @@
1
+ module Waffleiron
2
+ VERSION = '0.2.1'
3
+ end
data/lib/waffleiron.rb ADDED
@@ -0,0 +1 @@
1
+ require 'waffleiron/engine'
metadata CHANGED
@@ -1,102 +1,78 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: waffleiron
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 1
8
- - 2
9
- version: 0.1.2
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.1
10
5
  platform: ruby
11
- authors:
6
+ authors:
12
7
  - Andrew Jaswa
13
8
  autorequire:
14
9
  bindir: bin
15
10
  cert_chain: []
16
-
17
- date: 2012-09-24 00:00:00 -06:00
18
- default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
21
- name: rails
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- requirements:
25
- - - ">"
26
- - !ruby/object:Gem::Version
27
- segments:
28
- - 3
29
- - 1
30
- - 0
31
- version: 3.1.0
32
- type: :runtime
33
- version_requirements: *id001
34
- - !ruby/object:Gem::Dependency
11
+ date: 2013-12-04 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
35
14
  name: sass
36
- prerelease: false
37
- requirement: &id002 !ruby/object:Gem::Requirement
38
- requirements:
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
39
17
  - - ~>
40
- - !ruby/object:Gem::Version
41
- segments:
42
- - 3
43
- - 2
44
- - 0
45
- version: 3.2.0
18
+ - !ruby/object:Gem::Version
19
+ version: '3.2'
46
20
  type: :runtime
47
- version_requirements: *id002
48
- - !ruby/object:Gem::Dependency
49
- name: rake
50
21
  prerelease: false
51
- requirement: &id003 !ruby/object:Gem::Requirement
52
- requirements:
53
- - - ">="
54
- - !ruby/object:Gem::Version
55
- segments:
56
- - 0
57
- version: "0"
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '3.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
58
34
  type: :development
59
- version_requirements: *id003
60
- description: ""
61
- email:
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ description: '"Waffleiron is a "semantic" non-intrusive grid system powered by SASS/SCSS.
42
+ No floats, no extra classes and no non-sense. It just works."'
43
+ email:
62
44
  - ajaswa@gmail.com
63
45
  executables: []
64
-
65
46
  extensions: []
66
-
67
- extra_rdoc_files: []
68
-
69
- files:
47
+ extra_rdoc_files:
48
+ - README.md
49
+ files:
70
50
  - app/assets/stylesheets/_waffleiron.scss
71
- has_rdoc: true
72
- homepage: ""
51
+ - lib/waffleiron/version.rb
52
+ - lib/waffleiron/engine.rb
53
+ - lib/waffleiron.rb
54
+ - README.md
55
+ homepage: http://github.com/ajaswa/waffleiron
73
56
  licenses: []
74
-
57
+ metadata: {}
75
58
  post_install_message:
76
59
  rdoc_options: []
77
-
78
- require_paths:
60
+ require_paths:
79
61
  - lib
80
- required_ruby_version: !ruby/object:Gem::Requirement
81
- requirements:
82
- - - ">="
83
- - !ruby/object:Gem::Version
84
- segments:
85
- - 0
86
- version: "0"
87
- required_rubygems_version: !ruby/object:Gem::Requirement
88
- requirements:
89
- - - ">="
90
- - !ruby/object:Gem::Version
91
- segments:
92
- - 0
93
- version: "0"
62
+ required_ruby_version: !ruby/object:Gem::Requirement
63
+ requirements:
64
+ - - '>='
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
67
+ required_rubygems_version: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - '>='
70
+ - !ruby/object:Gem::Version
71
+ version: '0'
94
72
  requirements: []
95
-
96
- rubyforge_project:
97
- rubygems_version: 1.3.6
73
+ rubyforge_project: nowarning
74
+ rubygems_version: 2.0.6
98
75
  signing_key:
99
- specification_version: 3
100
- summary: ""
76
+ specification_version: 4
77
+ summary: '"Waffleiron is a flexable/responsive non-invasive SCSS grid system."'
101
78
  test_files: []
102
-