redgreengrid 0.1.0 → 0.2.0

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.
data/README.md CHANGED
@@ -24,10 +24,10 @@ Add to your screen.sass:
24
24
 
25
25
  // import basics
26
26
  @import redgreengrid/redgreengrid.sass
27
- // set font family
28
- @import redgreengrid/typography/helvetica.sass
29
- // add RedGreenGrid
30
- +rgg
27
+ // import font family for line height 20px
28
+ @import redgreengrid/fonts/20/helvetica.sass
29
+ +helvetica-light-13("p, li, td")
30
+
31
31
  // add styles to show the baseline grid
32
32
  +rgg-development
33
33
 
@@ -37,23 +37,6 @@ Add to your layout/application.html.haml:
37
37
  = redgreengrid
38
38
 
39
39
 
40
- Font Sizes
41
- ----------
42
-
43
- A RedGreenGrid based layout should have three font sizes: normal, big, huge.
44
- You can define which CSS selectors will get which size.
45
- Here’s the default.
46
- Be sure to place your changes on top of the @imports:
47
-
48
- !rgg_normal = "p, li, dt, dd, td, th, h3, h4, h5, h6, address"
49
- !rgg_big = "h2, legend"
50
- !rgg_huge = "h1"
51
-
52
- @import redgreengrid/redgreengrid.sass
53
- @import redgreengrid/typography/helvetica.sass
54
- +rgg
55
-
56
-
57
40
 
58
41
 
59
42
  Implementations Details
@@ -120,7 +103,7 @@ If you want to change the font size or line height:
120
103
 
121
104
  1. copy the SASS file of your preferred font family
122
105
  2. change the sizes
123
- 3. name the file `_<font-family>_<font-size>_<line-height>.sass`
106
+ 3. name the file `fonts/<line-height>/_<font-family>.sass`
124
107
  4. test it and fix it for “all” browsers
125
108
  5. make a pull request for RedGreenGrid to share it
126
109
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.2.0
Binary file
Binary file
data/redgreengrid.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{redgreengrid}
8
- s.version = "0.1.0"
8
+ s.version = "0.2.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Nico Hagenburger"]
12
- s.date = %q{2009-11-21}
12
+ s.date = %q{2009-11-30}
13
13
  s.description = %q{RedGreenGred makes it easy for you to build cross-browser baseline grid layouts.}
14
14
  s.email = %q{redgreengrid@hagenburger.net}
15
15
  s.extra_rdoc_files = [
@@ -24,15 +24,16 @@ Gem::Specification.new do |s|
24
24
  "lib/redgreengrid.rb",
25
25
  "lib/redgreengrid/helpers.rb",
26
26
  "pkg/redgreengrid-0.1.0.gem",
27
+ "pkg/redgreengrid-0.2.0.gem",
27
28
  "redgreengrid.gemspec",
28
29
  "sass/redgreengrid/_development.sass",
29
30
  "sass/redgreengrid/_redgreengrid.sass",
30
31
  "sass/redgreengrid/_reset.sass",
31
32
  "sass/redgreengrid/_typography.sass",
32
- "sass/redgreengrid/typography/_arial_13_20.sass",
33
- "sass/redgreengrid/typography/_helvetica_13_20.sass",
34
- "sass/redgreengrid/typography/_lucida_13_20.sass",
35
- "sass/redgreengrid/typography/_verdana_12_20.sass",
33
+ "sass/redgreengrid/fonts/20/_arial.sass",
34
+ "sass/redgreengrid/fonts/20/_helvetica.sass",
35
+ "sass/redgreengrid/fonts/20/_lucida.sass",
36
+ "sass/redgreengrid/fonts/20/_verdana.sass",
36
37
  "spec/redgreengrid/helpers_spec.rb",
37
38
  "spec/spec.opts",
38
39
  "spec/spec_helper.rb",
@@ -31,7 +31,7 @@
31
31
 
32
32
  div
33
33
  :border-bottom 1px #F33CE7 solid
34
- :margin-top = !rgg_line_height - 1px
34
+ :margin-top = !line_height - 1px
35
35
  :opacity 0.1
36
36
  :width = 1280px
37
37
 
@@ -45,6 +45,6 @@
45
45
 
46
46
  div
47
47
  :border-bottom 1px #50C45E solid
48
- :margin-top = !rgg_line_height - 1px
48
+ :margin-top = !line_height - 1px
49
49
  :opacity 0.2
50
50
  :width = 1280px
@@ -1,4 +1,4 @@
1
- a, body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, form, fieldset, legend, p, pre, span, th, td
1
+ a, body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, form, fieldset, legend, p, pre, span, th, td
2
2
  :background-repeat no-repeat
3
3
  :margin 0
4
4
  :padding 0
@@ -1,68 +1,75 @@
1
- !rgg_small ||= "small"
2
- !rgg_normal ||= "p, li, dt, dd, td, th, h3, h4, h5, h6, address"
3
- !rgg_big ||= "h2, legend"
4
- !rgg_huge ||= "h1"
5
- !rgg_bold ||= "h1, h2, h3, h4, h5, h6, strong, th"
6
- !rgg_inline_text ||= ""
7
- !rgg_inline_container ||= ""
1
+ !rgg_small ||= "small"
2
+ !rgg_normal ||= "p, li, dt, dd, td, th, h3, h4, h5, h6, address"
3
+ !rgg_big ||= "h2, legend"
4
+ !rgg_huge ||= "h1"
5
+ !rgg_bold ||= "h1, h2, h3, h4, h5, h6, strong, th"
6
+
7
+
8
+ =browser(!engine, !selector, !up)
9
+ .#{!engine}
10
+ #{!selector}
11
+ +up(!up)
12
+
13
+ =webkit(!selector, !up)
14
+ +browser("webkit", !selector, !up)
15
+
16
+ =presto(!selector, !up)
17
+ +browser("presto", !selector, !up)
18
+
19
+ =gecko(!selector, !up)
20
+ +browser("gecko", !selector, !up)
21
+
22
+ =trident(!selector, !up)
23
+ +browser("trident", !selector, !up)
8
24
 
9
25
 
10
26
  =up(!pixels)
11
27
  :position relative
12
28
  :bottom = !pixels
13
29
 
14
-
15
30
  =down(!pixels)
16
31
  +up(-!pixels)
17
32
 
18
33
 
19
- =typography(!tag, !tag_font_size, !tag_line_height, !tag_position = false)
20
- #{!tag}
21
- :font-size = !tag_font_size
22
- :line-height = !tag_line_height
23
- :margin = 0 0 !rgg_line_height
24
- @if !tag_position
25
- :position relative
26
- :bottom = !tag_position
34
+ =text-container
35
+ :bottom 0
36
+
37
+
38
+ =font(!family, !size, !lines = 1, !weight = false)
39
+ :font-family = !family
40
+ :font-size = !size
41
+ @if !weight
42
+ :font-weight = !weight
43
+ :line-height = !line_height * !lines
27
44
 
28
45
 
29
46
  =float-left(!lines)
30
- :height = !lines * !rgg_line_height
47
+ :height = !lines * !line_height
31
48
  :float left
32
- :margin = 0 !rgg_line_height !rgg_line_height 0
49
+ :margin = 0 !line_height !line_height 0
33
50
 
34
51
 
35
52
  =float-right(!lines)
36
- :height = !lines * !rgg_line_height
53
+ :height = !lines * !line_height
37
54
  :float right
38
- :margin = 0 0 !rgg_line_height !rgg_line_height
55
+ :margin = 0 0 !line_height !line_height
39
56
 
40
57
 
58
+ =margin-bottom(!lines = 1)
59
+ :margin-bottom = !lines * !line_height
41
60
 
42
- =rgg
43
- .box
44
- +float-left(2)
45
- :width 40px
46
- :background #ccc
47
-
48
- ul.list li
49
- :list-style circle
50
- :margin-left = !rgg_line_height
51
-
52
- ol.list li
53
- :list-style decimal
54
- :margin-left = !rgg_line_height
55
-
61
+ =margin-top(!lines = 1)
62
+ :margin-top = !lines * !line_height
63
+
64
+
65
+ =hr
56
66
  hr
57
- :border none
58
- :border-bottom 1px #ccc dotted
59
- :margin = !rgg_line_height 1px !rgg_line_height - 1px 0
67
+ :border none
68
+ :border-bottom 1px #ccc dotted
69
+ :clear both
70
+ :margin = !line_height 1px !line_height - 1px 0
60
71
  +up(1px)
61
72
 
62
73
  .gecko hr
63
- :margin-bottom = !rgg_line_height - 2px
74
+ :margin-bottom = !line_height - 2px
64
75
  +up(2px)
65
-
66
- @if !rgg_inline_container != ""
67
- #{!rgg_inline_container}
68
- :bottom 0
@@ -0,0 +1,20 @@
1
+ !line_height ||= 20px
2
+
3
+ !arial = "Arial, Helvetica, sans-serif"
4
+
5
+ =arial-13(!selector = !rgg_normal)
6
+ #{!selector}
7
+ +font(!arial, 13px)
8
+ +gecko(!selector, 1px)
9
+
10
+ =arial-16(!selector = !rgg_big)
11
+ #{!selector}
12
+ +font(!arial, 16px)
13
+ +up(1px)
14
+ +gecko(!selector, 2px)
15
+
16
+ =arial-37(!selector = !rgg_huge)
17
+ #{!selector}
18
+ +font(!arial, 37px, 2)
19
+ +down(1px)
20
+ +presto(!selector, -2px)
@@ -0,0 +1,61 @@
1
+ !line_height ||= 20px
2
+
3
+
4
+ // REGULAR
5
+
6
+ !helvetica = "'HelveticaNeue','Helvetica','Swiss 721','Arial','sans-serif'"
7
+
8
+ =helvetica-13(!selector = !rgg_normal)
9
+ #{!selector}
10
+ +font(!helvetica, 13px)
11
+
12
+ =helvetica-16(!selector = !rgg_big)
13
+ #{!selector}
14
+ +font(!helvetica, 16px)
15
+ +up(2px)
16
+
17
+ =helvetica-37(!selector = !rgg_huge)
18
+ #{!selector}
19
+ +font(!helvetica, 37px, 2)
20
+ +presto(!selector, 1px)
21
+
22
+
23
+ // LIGHT
24
+
25
+ !helvetica_light = "'HelveticaNeue-Light','Helvetica Neue Light','Helvetica Neue','Swiss 721 Light','Helvetica','Arial','sans-serif'"
26
+
27
+ =helvetica-light-13(!selector = !rgg_normal)
28
+ #{!selector}
29
+ +font(!helvetica_light, 13px, 1, 200)
30
+ +up(1px)
31
+
32
+ =helvetica-light-16(!selector = !rgg_big)
33
+ #{!selector}
34
+ +font(!helvetica_light, 16px, 1, 200)
35
+ +up(2px)
36
+
37
+ =helvetica-light-37(!selector = !rgg_huge)
38
+ #{!selector}
39
+ +font(!helvetica_light, 37px, 2, 200)
40
+ +presto(!selector, 1px)
41
+
42
+
43
+ // BOLD
44
+
45
+ !helvetica_bold = "'HelveticaNeue-Bold','Helvetica Neue Bold','Helvetica Neue','Swiss 721 Bold','Helvetica','Arial','sans-serif'"
46
+
47
+ =helvetica-bold-13(!selector = !rgg_normal)
48
+ #{!selector}
49
+ +font(!helvetica_bold, 13px)
50
+ +up(1px)
51
+
52
+ =helvetica-bold-16(!selector = !rgg_big)
53
+ #{!selector}
54
+ +font(!helvetica_bold, 16px)
55
+ +up(2px)
56
+
57
+ =helvetica-bold-37(!selector = !rgg_huge)
58
+ #{!selector}
59
+ +font(!helvetica_bold, 37px, 2)
60
+ +presto(!selector, 1px)
61
+
@@ -0,0 +1,21 @@
1
+ !line_height ||= 20px
2
+
3
+ !lucida = "'Lucida Grande', 'Tahoma', 'Vera Sans', 'Helvetica', 'Arial', 'sans-serif'"
4
+
5
+ +typography(!rgg_huge, 36px, !line_height * 2 )
6
+ +typography(!rgg_big, 16px, !line_height, 2px)
7
+ +typography(!rgg_normal, !rgg_font_size, !line_height, 1px)
8
+
9
+ =lucida-13(!selector = !rgg_normal)
10
+ #{!selector}
11
+ +font(!lucida, 13px)
12
+ +up(1px)
13
+
14
+ =lucida-16(!selector = !rgg_big)
15
+ #{!selector}
16
+ +font(!lucida, 16px)
17
+ +up(2px)
18
+
19
+ =lucida-36(!selector = !rgg_huge)
20
+ #{!selector}
21
+ +font(!lucida, 36px, 2)
@@ -0,0 +1,20 @@
1
+ !line_height ||= 20px
2
+
3
+ !verdana = "Verdana, Tahoma, 'Vera Sans', Helvetica, Arial, sans-serif"
4
+
5
+ =verdana-12(!selector = !rgg_normal)
6
+ #{!selector}
7
+ +font(!verdana, 12px)
8
+ +gecko(!selector, 1px)
9
+
10
+ =verdana-16(!selector = !rgg_big)
11
+ #{!selector}
12
+ +font(!verdana, 16px)
13
+ +webkit(!selector, 2px)
14
+ +presto(!selector, 2px)
15
+ +gecko(!selector, 3px)
16
+
17
+ =verdana-35(!selector = !rgg_huge)
18
+ #{!selector}
19
+ +font(!verdana, 36px, 2)
20
+ +gecko(!selector, 1px)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redgreengrid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nico Hagenburger
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-11-21 00:00:00 +01:00
12
+ date: 2009-11-30 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -30,15 +30,16 @@ files:
30
30
  - lib/redgreengrid.rb
31
31
  - lib/redgreengrid/helpers.rb
32
32
  - pkg/redgreengrid-0.1.0.gem
33
+ - pkg/redgreengrid-0.2.0.gem
33
34
  - redgreengrid.gemspec
34
35
  - sass/redgreengrid/_development.sass
35
36
  - sass/redgreengrid/_redgreengrid.sass
36
37
  - sass/redgreengrid/_reset.sass
37
38
  - sass/redgreengrid/_typography.sass
38
- - sass/redgreengrid/typography/_arial_13_20.sass
39
- - sass/redgreengrid/typography/_helvetica_13_20.sass
40
- - sass/redgreengrid/typography/_lucida_13_20.sass
41
- - sass/redgreengrid/typography/_verdana_12_20.sass
39
+ - sass/redgreengrid/fonts/20/_arial.sass
40
+ - sass/redgreengrid/fonts/20/_helvetica.sass
41
+ - sass/redgreengrid/fonts/20/_lucida.sass
42
+ - sass/redgreengrid/fonts/20/_verdana.sass
42
43
  - spec/redgreengrid/helpers_spec.rb
43
44
  - spec/spec.opts
44
45
  - spec/spec_helper.rb
@@ -1,23 +0,0 @@
1
- !rgg_font_size ||= 13px
2
- !rgg_line_height ||= 20px
3
-
4
- body
5
- :font-family "Arial", "Helvetica", "sans-serif"
6
-
7
- #{!rgg_bold}
8
- :font-weight bold
9
-
10
- +typography(!rgg_huge, 37px, !rgg_line_height * 2, -1px)
11
- +typography(!rgg_big, 16px, !rgg_line_height, 1px)
12
- +typography(!rgg_normal, !rgg_font_size, !rgg_line_height, )
13
-
14
- .presto
15
- #{!rgg_huge}
16
- +down(2px)
17
-
18
- .gecko
19
- #{!rgg_big}
20
- +up(2px)
21
-
22
- #{!rgg_normal}
23
- +up(1px)
@@ -1,19 +0,0 @@
1
- !rgg_font_size ||= 13px
2
- !rgg_line_height ||= 20px
3
-
4
- body
5
- :font-family "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", "Swiss 721 Light", "Helvetica", "Arial", "sans-serif"
6
- :font-weight 200
7
-
8
- #{!rgg_bold}
9
- :font-family "HelveticaNeue-Bold", "Helvetica Neue Bold", "Helvetica Neue", "Swiss 721 Bold", "Helvetica", "Arial", "sans-serif"
10
- :font-weight bold
11
-
12
- +typography(!rgg_huge, 37px, !rgg_line_height * 2 )
13
- +typography(!rgg_big, 16px, !rgg_line_height, 2px)
14
- +typography(!rgg_normal, !rgg_font_size, !rgg_line_height, 1px)
15
-
16
- .presto
17
- #{!rgg_big}
18
- +up(2px)
19
-
@@ -1,12 +0,0 @@
1
- !rgg_font_size ||= 13px
2
- !rgg_line_height ||= 20px
3
-
4
- body
5
- :font-family "Lucida Grande", "Tahoma", "Vera Sans", "Helvetica", "Arial", "sans-serif"
6
-
7
- #{!rgg_bold}
8
- :font-weight bold
9
-
10
- +typography(!rgg_huge, 36px, !rgg_line_height * 2 )
11
- +typography(!rgg_big, 16px, !rgg_line_height, 2px)
12
- +typography(!rgg_normal, !rgg_font_size, !rgg_line_height, 1px)
@@ -1,18 +0,0 @@
1
- !rgg_font_size ||= 12px
2
- !rgg_line_height ||= 20px
3
-
4
- body
5
- :font-family "Verdana", "Tahoma", "Vera Sans", "Helvetica", "Arial", "sans-serif"
6
-
7
- #{!rgg_bold}
8
- :font-weight bold
9
-
10
- +typography(!rgg_huge, 35px, !rgg_line_height * 2 )
11
- +typography(!rgg_big, 16px, !rgg_line_height, 2px)
12
- +typography(!rgg_normal, !rgg_font_size, !rgg_line_height )
13
-
14
- .gecko
15
- #{!rgg_big}
16
- +up(3px)
17
- #{!rgg_normal}
18
- +up(1px)