ggs-rails 0.2.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -13,6 +13,19 @@ Add `ggs-rails` to the `:assets` group of your Rails application.
13
13
  gem 'ggs-rails'
14
14
  end
15
15
 
16
+
17
+ Upgrading
18
+ ---------
19
+
20
+ Users of 0.x upgrading to 1.x should note that there were two breaking
21
+ changes in this release.
22
+
23
+ 1. `@include ggs-wrapper` now expects a full css selector, not just a
24
+ class name. Previouse use of `@include ggs-wrapper('wrapper')` should
25
+ be updated to `@include ggs-wrapper('.wrapper')`
26
+ 1. `@include ggs-margin-height` now provides a single line of margin on
27
+ both the top and bottom of the element, not just on the top.
28
+
16
29
  Usage
17
30
  -----
18
31
 
@@ -51,7 +64,7 @@ proper percentage.
51
64
  `ggs-margin-left($num_columns: 1)` and `ggs-margin-right($num_columns:
52
65
  1)`. Self explanatory.
53
66
 
54
- `ggs-margin-height($top_multipler: 1, $bottom_multiplier: 0)`: Sets
67
+ `ggs-margin-height($top_multipler: 1, $bottom_multiplier: 1)`: Sets
55
68
  `margin-top` and `margin-bottom` to the appropriate multplier of
56
69
  `line-height`
57
70
 
data/ggs-rails.gemspec CHANGED
@@ -9,13 +9,15 @@ Gem::Specification.new do |s|
9
9
  s.email = ['ryan@coshx.com']
10
10
  s.homepage = 'https://github.com/rahearn/ggs-rails'
11
11
  s.summary = %q{SASS mixins for easy implementation of The Golden Grid System}
12
- s.description = %q{SASS mixins for easy implementation of The Golden Grid System http://goldengridsystem.com/}
12
+ s.description = %q{SASS mixins for easy implementation of The Golden Grid System http://goldengridsystem.com/ and Frameless http://framelessgrid.com/}
13
13
 
14
14
  s.files = `git ls-files`.split("\n")
15
15
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
16
16
  s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename f }
17
17
  s.require_paths = ['lib']
18
18
 
19
+ s.post_install_message = "\nHEADS UP! ggs-rails 1.0 has many improvements, but has 2 important breaking changes. Please see the Upgrading note at https://github.com/rahearn/ggs-rails/blob/master/README.md for full information.\n\n"
20
+
19
21
  s.required_rubygems_version = '>= 1.3.6'
20
22
 
21
23
  s.add_runtime_dependency 'rails', '~> 3.2'
@@ -0,0 +1,172 @@
1
+ /*
2
+ * Based on the:
3
+ * Golden Grid System (1.0) <http://goldengridsystem.com/>
4
+ * by Joni Korpi <http://jonikorpi.com/>
5
+ * licensed under MIT <http://opensource.org/licenses/mit-license.php>
6
+ */
7
+
8
+ /*
9
+ *
10
+ * Margin, padding, and border resets
11
+ * except for form elements
12
+ *
13
+ */
14
+
15
+ html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, a, blockquote, pre, abbr, address, cite, code, del, dfn, em, img, ins, kbd, q, samp, small, strong, sub, sup, var, b, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, figure, footer, header, hgroup, nav, section, menu, time, mark, audio, video, canvas {
16
+ margin: 0;
17
+ padding: 0;
18
+ border: 0;
19
+ }
20
+
21
+
22
+ /*
23
+ *
24
+ * Consistency fixes
25
+ * adopted from http://necolas.github.com/normalize.css/
26
+ *
27
+ */
28
+
29
+ html {
30
+ height: 100%;
31
+ -webkit-text-size-adjust: 100%;
32
+ -ms-text-size-adjust: 100%;
33
+ }
34
+
35
+ body {
36
+ min-height: 100%;
37
+ font-size: 100%;
38
+ }
39
+
40
+ article, aside, details, figcaption, figure,
41
+ footer, header, hgroup, nav, section, audio, canvas, video {
42
+ display: block;
43
+ }
44
+
45
+ sub, sup {
46
+ font-size: 75%;
47
+ line-height: 0;
48
+ position: relative;
49
+ vertical-align: baseline;
50
+ }
51
+ sup { top: -0.5em; }
52
+ sub { bottom: -0.25em; }
53
+
54
+ pre {
55
+ white-space: pre;
56
+ white-space: pre-wrap;
57
+ word-wrap: break-word;
58
+ }
59
+
60
+ b, strong {
61
+ font-weight: bold;
62
+ }
63
+
64
+ abbr[title] {
65
+ border-bottom: 1px dotted;
66
+ }
67
+
68
+ input, textarea, button, select {
69
+ margin: 0;
70
+ font-size: 100%;
71
+ line-height: normal;
72
+ vertical-align: baseline;
73
+ }
74
+
75
+ button,
76
+ html input[type="button"],
77
+ input[type="reset"],
78
+ input[type="submit"] {
79
+ cursor: pointer;
80
+ -webkit-appearance: button;
81
+ }
82
+
83
+ input[type="checkbox"],
84
+ input[type="radio"] {
85
+ -webkit-box-sizing: border-box;
86
+ -moz-box-sizing: border-box;
87
+ -ms-box-sizing: border-box;
88
+ -o-box-sizing: border-box;
89
+ box-sizing: border-box;
90
+ }
91
+
92
+ textarea {
93
+ overflow: auto;
94
+ }
95
+
96
+ table {
97
+ border-collapse: collapse;
98
+ border-spacing: 0;
99
+ }
100
+
101
+
102
+ /*
103
+ *
104
+ * Simple fluid media
105
+ *
106
+ */
107
+
108
+ figure {
109
+ position: relative;
110
+ }
111
+
112
+ figure img, figure object, figure embed, figure video {
113
+ max-width: 100%;
114
+ display: block;
115
+ }
116
+
117
+ img {
118
+ border: 0;
119
+ -ms-interpolation-mode: bicubic;
120
+ }
121
+
122
+
123
+ /*
124
+ *
125
+ * Zoomable baseline grid
126
+ * type size presets
127
+ *
128
+ */
129
+
130
+ body {
131
+ /* 16px / 24px */
132
+ font-size: $ggs-font-size / 16 * 1em;
133
+ line-height: #{$ggs-line / $ggs-em}em;
134
+ }
135
+
136
+
137
+ h3 {
138
+ @include ggs-normal;
139
+ }
140
+
141
+ h1, h2 {
142
+ @include ggs-large;
143
+ /* 26 is font-size defined by ggs-large */
144
+ margin: ggs-lineheight($ggs-em/26) 0 ggs-lineheight($ggs-em*1.5/26);
145
+ }
146
+
147
+ h2 {
148
+ font-weight: normal;
149
+ }
150
+
151
+ h3 {
152
+ margin: ggs-lineheight(1) 0;
153
+ }
154
+
155
+ /*
156
+ *
157
+ * Fixes for IE6-8
158
+ * http://jonikorpi.com/leaving-old-IE-behind/
159
+ *
160
+ */
161
+
162
+ .ie body {
163
+ width: #{640/$ggs-em}em;
164
+ margin: 0 auto;
165
+ font-size: #{($ggs-font-size + 1) / $ggs-em}em;
166
+ }
167
+
168
+ .ie h1 {
169
+ @include ggs-huge;
170
+ /* 42 is font-size defined by ggs-huge */
171
+ margin: ggs-lineheight($ggs-em*2/42) 0 ggs-lineheight($ggs-em/42);
172
+ }
@@ -0,0 +1,8 @@
1
+ /* Functions for getting width of n columns */
2
+
3
+ @function frameless-column($multiplier) {
4
+ @return ($multiplier * ($ggs-fr-column + $ggs-fr-gutter) - $ggs-fr-gutter) / $ggs-fr-em;}
5
+
6
+ @mixin frameless-width($columns: 1) {
7
+ width: frameless-column($columns);
8
+ }
@@ -0,0 +1,98 @@
1
+ /*
2
+ Based on:
3
+ Frameless <http://framelessgrid.com/>
4
+ by Joni Korpi <http://jonikorpi.com/>
5
+ licensed under CC0 <http://creativecommons.org/publicdomain/zero/1.0/>
6
+ */
7
+
8
+ /*
9
+ Margin, padding, and border resets
10
+ except for form elements
11
+ */
12
+
13
+ body, div,
14
+ h1, h2, h3, h4, h5, h6,
15
+ p, blockquote, pre, dl, dt, dd, ol, ul, li,
16
+ fieldset, form, label, legend, th, td,
17
+ article, aside, figure, footer, header, hgroup, menu, nav, section {
18
+ margin: 0;
19
+ padding: 0;
20
+ border: 0;
21
+ }
22
+
23
+
24
+ /*
25
+ Consistency fixes
26
+ adopted from http://necolas.github.com/normalize.css/
27
+ */
28
+
29
+ article, aside, details, figcaption, figure,
30
+ footer, header, hgroup, nav, section, audio, canvas, video {
31
+ display: block;
32
+ }
33
+
34
+ html {
35
+ height: 100%;
36
+ -webkit-text-size-adjust: 100%;
37
+ -ms-text-size-adjust: 100%;
38
+ }
39
+
40
+ body {
41
+ min-height: 100%;
42
+ font-size: 100%;
43
+ }
44
+
45
+ sub, sup {
46
+ font-size: 75%;
47
+ line-height: 0;
48
+ position: relative;
49
+ vertical-align: baseline;
50
+ }
51
+
52
+ sup {top: -0.5em;}
53
+ sub {bottom: -0.25em;}
54
+
55
+ pre {
56
+ white-space: pre;
57
+ white-space: pre-wrap;
58
+ word-wrap: break-word;
59
+ }
60
+
61
+ b, strong {font-weight: bold;}
62
+ abbr[title] {border-bottom: 1px dotted;}
63
+
64
+ table {
65
+ border-collapse: collapse;
66
+ border-spacing: 0;
67
+ }
68
+
69
+ a img, img {
70
+ -ms-interpolation-mode: bicubic;
71
+ border: 0;
72
+ }
73
+
74
+ input, textarea, button, select {
75
+ margin: 0;
76
+ font-size: 100%;
77
+ line-height: normal;
78
+ vertical-align: baseline;
79
+ }
80
+
81
+ button,
82
+ html input[type="button"],
83
+ input[type="reset"],
84
+ input[type="submit"] {
85
+ cursor: pointer;
86
+ -webkit-appearance: button;
87
+ }
88
+
89
+ input[type="checkbox"],
90
+ input[type="radio"] {
91
+ -webkit-box-sizing: border-box;
92
+ -moz-box-sizing: border-box;
93
+ -o-box-sizing: border-box;
94
+ -ms-box-sizing: border-box;
95
+ box-sizing: border-box;
96
+ }
97
+
98
+ textarea {overflow: auto;}
@@ -1,9 +1,8 @@
1
1
  @function ggs-lineheight($multiplier) {
2
- $base_em: $ggs-font-size * 1;
3
- @return #{$ggs-line * $multiplier / $base_em}em;
2
+ @return #{$ggs-line * $multiplier / $ggs-em}em;
4
3
  }
5
4
 
6
- @mixin ggs-margin-height($top_multiplier: 1, $bottom_multiplier: 0) {
5
+ @mixin ggs-margin-height($top_multiplier: 1, $bottom_multiplier: 1) {
7
6
  @include ggs-margin-top($top_multiplier);
8
7
  @include ggs-margin-bottom($bottom_multiplier);
9
8
  }
@@ -0,0 +1,87 @@
1
+ /*
2
+ * Full reset to zoom baseline grid for various sizes.
3
+ * As provided by base GGS distribution
4
+ */
5
+
6
+
7
+ @include ggs-media-width(40em) {
8
+ body {
9
+ /* Zoom baseline grid to 17/16 = 1.0625 */
10
+ font-size: #{($ggs-font-size + 1) / $ggs-em}em;
11
+ }
12
+
13
+ h1 {
14
+ @include ggs-huge;
15
+ margin: ggs-lineheight($ggs-em*2/42) 0 ggs-lineheight($ggs-em/42);
16
+ }
17
+ }
18
+
19
+
20
+ /*
21
+ * Eight-column grid active
22
+ */
23
+
24
+ @include ggs-8-columns {
25
+ body {
26
+ /* Reset baseline grid to 16/16 = 1 */
27
+ font-size: #{($ggs-font-size) / $ggs-em}em;
28
+ }
29
+ }
30
+
31
+
32
+ @include ggs-media-width(55.5em) {
33
+ body {
34
+ /* Zoom baseline grid to 17/16 = 1.0625 */
35
+ font-size: #{($ggs-font-size + 1) / $ggs-em}em;
36
+ }
37
+ }
38
+
39
+
40
+ @include ggs-media-width(61.5em) {
41
+ body {
42
+ /* Reset baseline grid to 16/16 = 1.0 */
43
+ font-size: #{($ggs-font-size) / $ggs-em}em;
44
+ }
45
+ }
46
+
47
+
48
+ @include ggs-media-width(75em) {
49
+ body {
50
+ /* Zoom baseline grid to 17/16 = 1.0625 */
51
+ font-size: #{($ggs-font-size + 1) / $ggs-em}em;
52
+ }
53
+ }
54
+
55
+
56
+ @include ggs-media-width(87em) {
57
+ body {
58
+ /* Reset baseline grid to 16/16 = 1.0 */
59
+ font-size: #{($ggs-font-size) / $ggs-em}em;
60
+ }
61
+ }
62
+
63
+
64
+ @include ggs-media-width(105em) {
65
+ body {
66
+ /* Zoom baseline grid to 17/16 = 1.0625 */
67
+ font-size: #{($ggs-font-size + 1) / $ggs-em}em;
68
+ }
69
+ }
70
+
71
+
72
+ /*
73
+ * Sixteen-column grid active
74
+ */
75
+
76
+ /*@include ggs-16-column {*/
77
+ /*}*/
78
+
79
+
80
+ @include ggs-media-width(130em) {
81
+ body {
82
+ /* Zoom baseline grid to 18/16 = 1.125 */
83
+ font-size: #{($ggs-font-size + 2) / $ggs-em}em;
84
+ max-width: (2560/$ggs-em)em;
85
+ }
86
+ }
87
+
@@ -0,0 +1,37 @@
1
+ @mixin ggs-small {
2
+ /* 13px / 18px */
3
+ font-size: #{($ggs-font-size*0.8125) / $ggs-em}em;
4
+ line-height: ($ggs-line*0.75) / ($ggs-font-size*0.8125) * 1em;
5
+ }
6
+
7
+ @mixin ggs-normal {
8
+ /* 16px / 24px */
9
+ font-size: #{$ggs-font-size / $ggs-em}em;
10
+ line-height: #{$ggs-line / $ggs-em}em; /* 24 */
11
+ }
12
+
13
+ @mixin ggs-large {
14
+ /* 26 / 36px */
15
+ font-size: #{26 / $ggs-em}em;
16
+ line-height: ($ggs-line*1.5) / 26 * 1em;
17
+ }
18
+
19
+ @mixin ggs-huge {
20
+ /* 42px / 48px */
21
+ font-size: #{42 / $ggs-em}em;
22
+ line-height: ($ggs-line*2) / 42 * 1em;
23
+ }
24
+
25
+ @mixin ggs-massive {
26
+ /* 68px / 72px */
27
+ font-size: #{68 / $ggs-em}em;
28
+ line-height: ($ggs-line*3) / 68 * 1em;
29
+ }
30
+
31
+ @mixin ggs-gigantic {
32
+ /* 110px / 120px */
33
+ font-size: #{110 / $ggs-em}em;
34
+ line-height: ($ggs-line*5) / 110 * 1em;
35
+ }
36
+
37
+
@@ -1,7 +1,7 @@
1
1
 
2
- @mixin ggs-wrapper($class-name: 'wrapper') {
3
- .#{$class-name} {
4
- padding: 0 #{($ggs-line/2)/$ggs-em}em;
2
+ @mixin ggs-wrapper($selector: '.wrapper') {
3
+ #{$selector} {
4
+ padding: 0 ggs-lineheight(0.5);
5
5
  -webkit-box-sizing: border-box;
6
6
  -moz-box-sizing: border-box;
7
7
  -ms-box-sizing: border-box;
@@ -0,0 +1,7 @@
1
+ $ggs-font-size: 16px !default;
2
+ $ggs-em: $ggs-font-size / 1em !default;
3
+
4
+ $ggs-column: 48px !default;
5
+ $ggs-gutter: 24px !default;
6
+
7
+ @import "ggs/frameless/methods";
@@ -5,6 +5,9 @@ $ggs-em: $ggs-font-size * 1 !default;
5
5
  $ggs-8-column-breakpoint: 45em !default;
6
6
  $ggs-16-column-breakpoint: 117em !default;
7
7
 
8
+ @import "ggs/wrapper";
8
9
  @import "ggs/columns";
9
10
  @import "ggs/width";
10
11
  @import "ggs/lineheight";
12
+ @import "ggs/typography";
13
+ @import "ggs/basic-reset";
data/lib/ggs/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module GGS
2
- VERSION = '0.2.0'
2
+ VERSION = '1.0.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ggs-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 1.0.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-24 00:00:00.000000000 Z
12
+ date: 2013-04-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &70322935061320 !ruby/object:Gem::Requirement
16
+ requirement: &70353799988200 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '3.2'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70322935061320
24
+ version_requirements: *70353799988200
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: sass
27
- requirement: &70322935060580 !ruby/object:Gem::Requirement
27
+ requirement: &70353799986560 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '3.2'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70322935060580
35
+ version_requirements: *70353799986560
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rake
38
- requirement: &70322935060040 !ruby/object:Gem::Requirement
38
+ requirement: &70353799984560 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0.9'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70322935060040
46
+ version_requirements: *70353799984560
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bundler
49
- requirement: &70322935059440 !ruby/object:Gem::Requirement
49
+ requirement: &70353799982840 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,8 +54,9 @@ dependencies:
54
54
  version: '1.2'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70322935059440
57
+ version_requirements: *70353799982840
58
58
  description: SASS mixins for easy implementation of The Golden Grid System http://goldengridsystem.com/
59
+ and Frameless http://framelessgrid.com/
59
60
  email:
60
61
  - ryan@coshx.com
61
62
  executables: []
@@ -69,9 +70,15 @@ files:
69
70
  - Rakefile
70
71
  - ggs-rails.gemspec
71
72
  - lib/assets/javascripts/GGS.js
73
+ - lib/assets/stylesheets/ggs-frameless.scss
72
74
  - lib/assets/stylesheets/ggs.scss
75
+ - lib/assets/stylesheets/ggs/basic-reset.scss
73
76
  - lib/assets/stylesheets/ggs/columns.scss
77
+ - lib/assets/stylesheets/ggs/frameless/methods.scss
78
+ - lib/assets/stylesheets/ggs/frameless/reset.scss
74
79
  - lib/assets/stylesheets/ggs/lineheight.scss
80
+ - lib/assets/stylesheets/ggs/reset.scss
81
+ - lib/assets/stylesheets/ggs/typography.scss
75
82
  - lib/assets/stylesheets/ggs/width.scss
76
83
  - lib/assets/stylesheets/ggs/wrapper.scss
77
84
  - lib/ggs-rails.rb
@@ -79,7 +86,14 @@ files:
79
86
  - lib/ggs/version.rb
80
87
  homepage: https://github.com/rahearn/ggs-rails
81
88
  licenses: []
82
- post_install_message:
89
+ post_install_message: ! '
90
+
91
+ HEADS UP! ggs-rails 1.0 has many improvements, but has 2 important breaking changes.
92
+ Please see the Upgrading note at https://github.com/rahearn/ggs-rails/blob/master/README.md
93
+ for full information.
94
+
95
+
96
+ '
83
97
  rdoc_options: []
84
98
  require_paths:
85
99
  - lib
@@ -91,7 +105,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
91
105
  version: '0'
92
106
  segments:
93
107
  - 0
94
- hash: 1525528690884040206
108
+ hash: 1560354848021214070
95
109
  required_rubygems_version: !ruby/object:Gem::Requirement
96
110
  none: false
97
111
  requirements: