jsmestad-compass 0.4.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (176) hide show
  1. data/Manifest +175 -0
  2. data/README.markdown +17 -0
  3. data/Rakefile +125 -0
  4. data/VERSION +1 -0
  5. data/bin/compass +8 -0
  6. data/compass.gemspec +37 -0
  7. data/examples/blueprint_default/index.html +73 -0
  8. data/examples/blueprint_default/parts/elements.html +246 -0
  9. data/examples/blueprint_default/parts/forms.html +100 -0
  10. data/examples/blueprint_default/parts/grid.html +206 -0
  11. data/examples/blueprint_default/parts/test-small.jpg +0 -0
  12. data/examples/blueprint_default/parts/test.jpg +0 -0
  13. data/examples/blueprint_default/parts/valid.png +0 -0
  14. data/examples/blueprint_default/stylesheets/ie.sass +3 -0
  15. data/examples/blueprint_default/stylesheets/images/grid.png +0 -0
  16. data/examples/blueprint_default/stylesheets/print.sass +3 -0
  17. data/examples/blueprint_default/stylesheets/screen.sass +8 -0
  18. data/examples/blueprint_plugins/index.html +60 -0
  19. data/examples/blueprint_plugins/parts/fancy_type.html +84 -0
  20. data/examples/blueprint_plugins/parts/test-small.jpg +0 -0
  21. data/examples/blueprint_plugins/parts/test.jpg +0 -0
  22. data/examples/blueprint_plugins/parts/valid.png +0 -0
  23. data/examples/blueprint_plugins/stylesheets/ie.sass +3 -0
  24. data/examples/blueprint_plugins/stylesheets/images/grid.png +0 -0
  25. data/examples/blueprint_plugins/stylesheets/print.sass +3 -0
  26. data/examples/blueprint_plugins/stylesheets/screen.sass +11 -0
  27. data/examples/blueprint_scoped/stylesheets/ie.sass +3 -0
  28. data/examples/blueprint_scoped/stylesheets/print.sass +3 -0
  29. data/examples/blueprint_scoped/stylesheets/screen.sass +4 -0
  30. data/examples/blueprint_scoped_form/stylesheets/ie.sass +3 -0
  31. data/examples/blueprint_scoped_form/stylesheets/print.sass +3 -0
  32. data/examples/blueprint_scoped_form/stylesheets/screen.sass +10 -0
  33. data/examples/blueprint_semantic/index.html +68 -0
  34. data/examples/blueprint_semantic/parts/fancy_type.html +84 -0
  35. data/examples/blueprint_semantic/parts/liquid.html +84 -0
  36. data/examples/blueprint_semantic/parts/test-small.jpg +0 -0
  37. data/examples/blueprint_semantic/parts/test.jpg +0 -0
  38. data/examples/blueprint_semantic/parts/valid.png +0 -0
  39. data/examples/blueprint_semantic/stylesheets/ie.sass +3 -0
  40. data/examples/blueprint_semantic/stylesheets/images/grid.png +0 -0
  41. data/examples/blueprint_semantic/stylesheets/liquid.sass +70 -0
  42. data/examples/blueprint_semantic/stylesheets/print.sass +3 -0
  43. data/examples/blueprint_semantic/stylesheets/screen.sass +69 -0
  44. data/examples/compass/compass.html +19 -0
  45. data/examples/compass/sticky_footer.html.haml +14 -0
  46. data/examples/compass/stylesheets/compass.sass +47 -0
  47. data/examples/compass/stylesheets/images/blue_arrow.gif +0 -0
  48. data/examples/compass/stylesheets/sticky_footer.sass +11 -0
  49. data/examples/compass/stylesheets/utilities.sass +65 -0
  50. data/examples/compass/utilities.html.haml +136 -0
  51. data/examples/yui/divisions.html.haml +179 -0
  52. data/examples/yui/index.html.haml +19 -0
  53. data/examples/yui/stylesheets/screen.sass +13 -0
  54. data/examples/yui/sub_divisions.html.haml +169 -0
  55. data/examples/yui/templates.html.haml +54 -0
  56. data/examples/yui/test.jpg +0 -0
  57. data/examples/yui/typography.html.haml +132 -0
  58. data/frameworks/blueprint.rb +2 -0
  59. data/frameworks/blueprint/lib/blueprint/constants.rb +17 -0
  60. data/frameworks/blueprint/lib/blueprint/grid_builder.rb +54 -0
  61. data/frameworks/blueprint/stylesheets/_blueprint.sass +3 -0
  62. data/frameworks/blueprint/stylesheets/blueprint/_ie.sass +49 -0
  63. data/frameworks/blueprint/stylesheets/blueprint/_print.sass +82 -0
  64. data/frameworks/blueprint/stylesheets/blueprint/_screen.sass +15 -0
  65. data/frameworks/blueprint/stylesheets/blueprint/modules/_colors.sass +30 -0
  66. data/frameworks/blueprint/stylesheets/blueprint/modules/_debug.sass +9 -0
  67. data/frameworks/blueprint/stylesheets/blueprint/modules/_fancy_type.sass +81 -0
  68. data/frameworks/blueprint/stylesheets/blueprint/modules/_form.sass +43 -0
  69. data/frameworks/blueprint/stylesheets/blueprint/modules/_grid.sass +141 -0
  70. data/frameworks/blueprint/stylesheets/blueprint/modules/_interaction.sass +58 -0
  71. data/frameworks/blueprint/stylesheets/blueprint/modules/_liquid.sass +137 -0
  72. data/frameworks/blueprint/stylesheets/blueprint/modules/_scaffolding.sass +46 -0
  73. data/frameworks/blueprint/stylesheets/blueprint/modules/_typography.sass +153 -0
  74. data/frameworks/blueprint/stylesheets/blueprint/modules/_utilities.sass +37 -0
  75. data/frameworks/blueprint/templates/project/grid.png +0 -0
  76. data/frameworks/blueprint/templates/project/ie.sass +3 -0
  77. data/frameworks/blueprint/templates/project/manifest.rb +5 -0
  78. data/frameworks/blueprint/templates/project/print.sass +3 -0
  79. data/frameworks/blueprint/templates/project/screen.sass +8 -0
  80. data/frameworks/compass.rb +2 -0
  81. data/frameworks/compass/stylesheets/_compass.sass +1 -0
  82. data/frameworks/compass/stylesheets/compass/_layout.sass +1 -0
  83. data/frameworks/compass/stylesheets/compass/_reset.sass +3 -0
  84. data/frameworks/compass/stylesheets/compass/_utilities.sass +5 -0
  85. data/frameworks/compass/stylesheets/compass/layout/_sticky_footer.sass +17 -0
  86. data/frameworks/compass/stylesheets/compass/utilities/_general.sass +4 -0
  87. data/frameworks/compass/stylesheets/compass/utilities/_links.sass +3 -0
  88. data/frameworks/compass/stylesheets/compass/utilities/_lists.sass +3 -0
  89. data/frameworks/compass/stylesheets/compass/utilities/_print.sass +24 -0
  90. data/frameworks/compass/stylesheets/compass/utilities/_tables.sass +1 -0
  91. data/frameworks/compass/stylesheets/compass/utilities/_text.sass +2 -0
  92. data/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.sass +11 -0
  93. data/frameworks/compass/stylesheets/compass/utilities/general/_inline_block.sass +6 -0
  94. data/frameworks/compass/stylesheets/compass/utilities/general/_reset.sass +58 -0
  95. data/frameworks/compass/stylesheets/compass/utilities/general/_tabs.sass +0 -0
  96. data/frameworks/compass/stylesheets/compass/utilities/general/_tag_cloud.sass +19 -0
  97. data/frameworks/compass/stylesheets/compass/utilities/links/_hover_link.sass +5 -0
  98. data/frameworks/compass/stylesheets/compass/utilities/links/_link_colors.sass +24 -0
  99. data/frameworks/compass/stylesheets/compass/utilities/links/_unstyled_link.sass +5 -0
  100. data/frameworks/compass/stylesheets/compass/utilities/lists/_bullets.sass +21 -0
  101. data/frameworks/compass/stylesheets/compass/utilities/lists/_horizontal_list.sass +20 -0
  102. data/frameworks/compass/stylesheets/compass/utilities/lists/_inline_list.sass +29 -0
  103. data/frameworks/compass/stylesheets/compass/utilities/tables/_alternating_rows_and_columns.sass +25 -0
  104. data/frameworks/compass/stylesheets/compass/utilities/text/_nowrap.sass +3 -0
  105. data/frameworks/compass/stylesheets/compass/utilities/text/_replacement.sass +10 -0
  106. data/frameworks/compass/templates/project/ie.sass +6 -0
  107. data/frameworks/compass/templates/project/manifest.rb +3 -0
  108. data/frameworks/compass/templates/project/print.sass +6 -0
  109. data/frameworks/compass/templates/project/screen.sass +7 -0
  110. data/frameworks/yui.rb +2 -0
  111. data/frameworks/yui/COPYRIGHT +15 -0
  112. data/frameworks/yui/stylesheets/_yui.sass +7 -0
  113. data/frameworks/yui/stylesheets/yui/modules/_base.sass +60 -0
  114. data/frameworks/yui/stylesheets/yui/modules/_fonts.sass +38 -0
  115. data/frameworks/yui/stylesheets/yui/modules/_grids.sass +341 -0
  116. data/frameworks/yui/templates/project/manifest.rb +1 -0
  117. data/frameworks/yui/templates/project/screen.sass +4 -0
  118. data/lib/compass.rb +39 -0
  119. data/lib/compass/actions.rb +92 -0
  120. data/lib/compass/commands/base.rb +26 -0
  121. data/lib/compass/commands/create_project.rb +41 -0
  122. data/lib/compass/commands/list_frameworks.rb +16 -0
  123. data/lib/compass/commands/print_version.rb +23 -0
  124. data/lib/compass/commands/project_base.rb +74 -0
  125. data/lib/compass/commands/update_project.rb +61 -0
  126. data/lib/compass/commands/watch_project.rb +53 -0
  127. data/lib/compass/compiler.rb +40 -0
  128. data/lib/compass/configuration.rb +92 -0
  129. data/lib/compass/core_ext.rb +12 -0
  130. data/lib/compass/errors.rb +7 -0
  131. data/lib/compass/exec.rb +184 -0
  132. data/lib/compass/frameworks.rb +29 -0
  133. data/lib/compass/installers.rb +5 -0
  134. data/lib/compass/installers/base.rb +135 -0
  135. data/lib/compass/installers/manifest.rb +57 -0
  136. data/lib/compass/installers/rails.rb +125 -0
  137. data/lib/compass/installers/stand_alone.rb +76 -0
  138. data/lib/compass/logger.rb +34 -0
  139. data/lib/compass/merb.rb +43 -0
  140. data/lib/compass/test_case.rb +37 -0
  141. data/lib/compass/validate.rb +13 -0
  142. data/lib/compass/validate/COPYRIGHT.html +93 -0
  143. data/lib/compass/validate/JIGSAW_COPYRIGHT +64 -0
  144. data/lib/compass/validate/README.html +83 -0
  145. data/lib/compass/validate/XERCES_COPYING.txt +56 -0
  146. data/lib/compass/validate/css-validator-javadoc.jar +0 -0
  147. data/lib/compass/validate/css-validator.jar +0 -0
  148. data/lib/compass/validate/jigsaw.jar +0 -0
  149. data/lib/compass/validate/xerces.jar +0 -0
  150. data/lib/compass/validator.rb +59 -0
  151. data/lib/compass/version.rb +66 -0
  152. data/lib/sass_extensions.rb +13 -0
  153. data/test/command_line_test.rb +147 -0
  154. data/test/compass_test.rb +148 -0
  155. data/test/configuration_test.rb +28 -0
  156. data/test/fixtures/stylesheets/blueprint/css/typography.css +158 -0
  157. data/test/fixtures/stylesheets/blueprint/sass/ie.sass +3 -0
  158. data/test/fixtures/stylesheets/blueprint/sass/print.sass +3 -0
  159. data/test/fixtures/stylesheets/blueprint/sass/screen.sass +17 -0
  160. data/test/fixtures/stylesheets/blueprint/sass/typography.sass +3 -0
  161. data/test/fixtures/stylesheets/compass/css/layout.css +14 -0
  162. data/test/fixtures/stylesheets/compass/css/print.css +19 -0
  163. data/test/fixtures/stylesheets/compass/css/reset.css +69 -0
  164. data/test/fixtures/stylesheets/compass/css/utilities.css +21 -0
  165. data/test/fixtures/stylesheets/compass/sass/layout.sass +3 -0
  166. data/test/fixtures/stylesheets/compass/sass/print.sass +5 -0
  167. data/test/fixtures/stylesheets/compass/sass/reset.sass +1 -0
  168. data/test/fixtures/stylesheets/compass/sass/utilities.sass +5 -0
  169. data/test/fixtures/stylesheets/yui/css/mixins.css +16 -0
  170. data/test/fixtures/stylesheets/yui/sass/base.sass +3 -0
  171. data/test/fixtures/stylesheets/yui/sass/fonts.sass +3 -0
  172. data/test/fixtures/stylesheets/yui/sass/grids.sass +3 -0
  173. data/test/fixtures/stylesheets/yui/sass/mixins.sass +16 -0
  174. data/test/sass_extensions_test.rb +26 -0
  175. data/test/test_helper.rb +47 -0
  176. metadata +291 -0
@@ -0,0 +1,28 @@
1
+ require File.dirname(__FILE__)+'/test_helper'
2
+ require 'compass'
3
+
4
+ class ConfigurationTest < Test::Unit::TestCase
5
+ def test_parse_and_serialize
6
+ contents = <<-CONFIG
7
+ require 'compass'
8
+ require 'sass'
9
+
10
+ css_dir = "css"
11
+ sass_dir = "sass"
12
+ images_dir = "img"
13
+ javascripts_dir = "js"
14
+ CONFIG
15
+
16
+ Compass.configuration.parse_string(contents, "test_parse")
17
+
18
+ assert_equal 'sass', Compass.configuration.sass_dir
19
+ assert_equal 'css', Compass.configuration.css_dir
20
+ assert_equal 'img', Compass.configuration.images_dir
21
+ assert_equal 'js', Compass.configuration.javascripts_dir
22
+
23
+ expected_lines = contents.split("\n").map{|l|l.strip}
24
+ actual_lines = Compass.configuration.serialize.split("\n").map{|l|l.strip}
25
+ assert_equal expected_lines, actual_lines
26
+ end
27
+
28
+ end
@@ -0,0 +1,158 @@
1
+
2
+
3
+ body {
4
+ font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
5
+ color: #333333;
6
+ font-size: 75%; }
7
+
8
+ h1 {
9
+ font-weight: normal;
10
+ color: #222222;
11
+ font-size: 3em;
12
+ line-height: 1;
13
+ margin-bottom: 0.5em; }
14
+ h1 img {
15
+ margin: 0; }
16
+
17
+ h2 {
18
+ font-weight: normal;
19
+ color: #222222;
20
+ font-size: 2em;
21
+ margin-bottom: 0.75em; }
22
+
23
+ h3 {
24
+ font-weight: normal;
25
+ color: #222222;
26
+ font-size: 1.5em;
27
+ line-height: 1;
28
+ margin-bottom: 1em; }
29
+
30
+ h4 {
31
+ font-weight: normal;
32
+ color: #222222;
33
+ font-size: 1.2em;
34
+ line-height: 1.25;
35
+ margin-bottom: 1.25em;
36
+ height: 1.25em; }
37
+
38
+ h5 {
39
+ font-weight: normal;
40
+ color: #222222;
41
+ font-size: 1em;
42
+ font-weight: bold;
43
+ margin-bottom: 1.5em; }
44
+
45
+ h6 {
46
+ font-weight: normal;
47
+ color: #222222;
48
+ font-size: 1em;
49
+ font-weight: bold; }
50
+
51
+ h2 img, h3 img, h4 img, h5 img, h6 img {
52
+ margin: 0; }
53
+
54
+ p {
55
+ margin: 0 0 1.5em; }
56
+ p img {
57
+ float: left;
58
+ margin: 1.5em 1.5em 1.5em 0;
59
+ padding: 0; }
60
+ p img.right {
61
+ float: right;
62
+ margin: 1.5em 0 1.5em 1.5em; }
63
+
64
+ a {
65
+ text-decoration: underline;
66
+ color: #000099; }
67
+ a:visited {
68
+ color: #000066; }
69
+ a:focus {
70
+ color: black; }
71
+ a:hover {
72
+ color: black; }
73
+ a:active {
74
+ color: #cc0099; }
75
+
76
+ blockquote {
77
+ margin: 1.5em;
78
+ color: #666;
79
+ font-style: italic; }
80
+
81
+ strong {
82
+ font-weight: bold; }
83
+
84
+ em {
85
+ font-style: italic; }
86
+
87
+ dfn {
88
+ font-style: italic;
89
+ font-weight: bold; }
90
+
91
+ sup, sub {
92
+ line-height: 0; }
93
+
94
+ abbr, acronym {
95
+ border-bottom: 1px dotted #666; }
96
+
97
+ address {
98
+ margin: 0 0 1.5em;
99
+ font-style: italic; }
100
+
101
+ del {
102
+ color: #666; }
103
+
104
+ pre, code {
105
+ margin: 1.5em 0;
106
+ white-space: pre;
107
+ font: 1em 'andale mono', 'lucida console', monospace;
108
+ line-height: 1.5; }
109
+
110
+ tt {
111
+ font: 1em 'andale mono', 'lucida console', monospace;
112
+ line-height: 1.5; }
113
+
114
+ li ul, li ol {
115
+ margin: 0 1.5em; }
116
+
117
+ ul {
118
+ margin: 0 1.5em 1.5em 1.5em;
119
+ list-style-type: disc; }
120
+
121
+ ol {
122
+ margin: 0 1.5em 1.5em 1.5em;
123
+ list-style-type: decimal; }
124
+
125
+ dl {
126
+ margin: 0 0 1.5em 0; }
127
+ dl dt {
128
+ font-weight: bold; }
129
+
130
+ dd {
131
+ margin-left: 1.5em; }
132
+
133
+ table {
134
+ margin-bottom: 1.4em;
135
+ width: 100%; }
136
+
137
+ th {
138
+ font-weight: bold;
139
+ background: #C3D9FF;
140
+ padding: 4px 10px 4px 5px; }
141
+
142
+ td {
143
+ padding: 4px 10px 4px 5px; }
144
+
145
+ tr.even td {
146
+ background: #E5ECF9; }
147
+
148
+ tfoot {
149
+ font-style: italic; }
150
+
151
+ caption {
152
+ background: #eee; }
153
+
154
+ .quiet {
155
+ color: #666666; }
156
+
157
+ .loud {
158
+ color: #111111; }
@@ -0,0 +1,3 @@
1
+ @import blueprint/ie
2
+
3
+ +blueprint-ie
@@ -0,0 +1,3 @@
1
+ @import blueprint/print
2
+
3
+ +blueprint-print
@@ -0,0 +1,17 @@
1
+ @import blueprint/screen
2
+ @import compass/reset
3
+
4
+ +blueprint
5
+ #main.container
6
+ #top
7
+ +column(24, true)
8
+ #middle
9
+ +column(24, true)
10
+ #left
11
+ +column(6)
12
+ #content
13
+ +column(12)
14
+ #right
15
+ +column(6, true)
16
+ #bottom
17
+ +column(24, true)
@@ -0,0 +1,3 @@
1
+ @import blueprint/modules/typography.sass
2
+
3
+ +blueprint-typography
@@ -0,0 +1,14 @@
1
+
2
+ html, body {
3
+ height: 100%; }
4
+
5
+ #layout {
6
+ min-height: 100%;
7
+ margin-bottom: -72px; }
8
+ #layout #layout_footer {
9
+ height: 72px; }
10
+
11
+ #footer {
12
+ clear: both;
13
+ position: relative;
14
+ height: 72px; }
@@ -0,0 +1,19 @@
1
+
2
+ .noprint,
3
+ .no-print {
4
+ display: none; }
5
+
6
+ address.print-only, blockquote.print-only, center.print-only, dir.print-only, div.print-only, dd.print-only, dl.print-only, dt.print-only,
7
+ fieldset.print-only, form.print-only, frameset.print-only, h1.print-only, h2.print-only, h3.print-only, h4.print-only, h5.print-only, h6.print-only, hr.print-only,
8
+ isindex.print-only, li.print-only, menu.print-only, noframes.print-only, noscript.print-only, ol.print-only, p.print-only, pre.print-only,
9
+ table.print-only, tbody.print-only, td.print-only, tfoot.print-only, th.print-only, thead.print-only, tr.print-only, ul.print-only {
10
+ display: block; }
11
+
12
+ a.print-only, abbr.print-only, acronym.print-only, b.print-only, basefont.print-only, bdo.print-only, big.print-only, br.print-only, cite.print-only,
13
+ code.print-only, dfn.print-only, em.print-only, font.print-only, i.print-only, img.print-only, input.print-only, kbd.print-only, label.print-only, q.print-only, s.print-only,
14
+ samp.print-only, select.print-only, small.print-only, span.print-only, strike.print-only, strong.print-only, sub.print-only, sup.print-only,
15
+ textarea.print-only, tt.print-only, u.print-only, var.print-only {
16
+ display: inline; }
17
+
18
+ .print-only {
19
+ display: none; }
@@ -0,0 +1,69 @@
1
+
2
+ html, body {
3
+ margin: 0;
4
+ padding: 0;
5
+ border: 0;
6
+ font-weight: inherit;
7
+ font-style: inherit;
8
+ font-size: 100%;
9
+ font-family: inherit;
10
+ vertical-align: baseline; }
11
+
12
+ div, span, object, iframe, h1, h2, h3, h4, h5, h6, p,
13
+ pre, a, abbr, acronym, address, code, del, dfn, em, img,
14
+ dl, dt, dd, ol, ul, li, fieldset, form, label, legend, caption, tbody, tfoot, thead, tr {
15
+ margin: 0;
16
+ padding: 0;
17
+ border: 0;
18
+ font-weight: inherit;
19
+ font-style: inherit;
20
+ font-size: 100%;
21
+ font-family: inherit;
22
+ vertical-align: baseline; }
23
+
24
+ body {
25
+ line-height: 1.5; }
26
+
27
+ blockquote, q {
28
+ margin: 0;
29
+ padding: 0;
30
+ border: 0;
31
+ font-weight: inherit;
32
+ font-style: inherit;
33
+ font-size: 100%;
34
+ font-family: inherit;
35
+ vertical-align: baseline;
36
+ quotes: "" ""; }
37
+ blockquote:before,
38
+ blockquote:after, q:before,
39
+ q:after {
40
+ content: ""; }
41
+
42
+ th, td, caption {
43
+ margin: 0;
44
+ padding: 0;
45
+ border: 0;
46
+ font-weight: inherit;
47
+ font-style: inherit;
48
+ font-size: 100%;
49
+ font-family: inherit;
50
+ vertical-align: baseline;
51
+ text-align: left;
52
+ font-weight: normal;
53
+ vertical-align: middle; }
54
+
55
+ table {
56
+ margin: 0;
57
+ padding: 0;
58
+ border: 0;
59
+ font-weight: inherit;
60
+ font-style: inherit;
61
+ font-size: 100%;
62
+ font-family: inherit;
63
+ vertical-align: baseline;
64
+ border-collapse: separate;
65
+ border-spacing: 0;
66
+ vertical-align: middle; }
67
+
68
+ a img {
69
+ border: none; }
@@ -0,0 +1,21 @@
1
+
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+ .clearfix {
17
+ overflow: auto;
18
+ overflow: -moz-scrollbars-none;
19
+ display: inline-block; }
20
+ .clearfix {
21
+ display: block; }
@@ -0,0 +1,3 @@
1
+ @import compass/layout.sass
2
+
3
+ +sticky-footer(72px, "#layout", "#layout_footer", "#footer")
@@ -0,0 +1,5 @@
1
+ @import compass/utilities/print.sass
2
+
3
+ +print-utilities
4
+
5
+ +print-utilities("screen")
@@ -0,0 +1 @@
1
+ @import compass/reset.sass
@@ -0,0 +1,5 @@
1
+ @import compass/utilities.sass
2
+
3
+
4
+ .clearfix
5
+ +clearfix
@@ -0,0 +1,16 @@
1
+
2
+
3
+
4
+ .font-size-26px {
5
+ font-size: 200%; }
6
+
7
+ .font-size-baseline {
8
+ font-size: 300%; }
9
+
10
+ .em-sizing {
11
+ width: 1em;
12
+ margin: 9em; }
13
+
14
+ .em-sizing-hack {
15
+ width: 1em;
16
+ *width: 0.975em; }
@@ -0,0 +1,3 @@
1
+ @import yui/modules/base.sass
2
+
3
+ +yui-base
@@ -0,0 +1,3 @@
1
+ @import yui/modules/fonts.sass
2
+
3
+ +yui-base-fonts
@@ -0,0 +1,3 @@
1
+ @import yui/modules/grids.sass
2
+
3
+ +yui-grids
@@ -0,0 +1,16 @@
1
+ @import yui/modules/fonts.sass
2
+ @import yui/modules/grids.sass
3
+
4
+ .font-size-26px
5
+ +font-size(26px)
6
+
7
+ .font-size-baseline
8
+ +font-size(30px, 10px)
9
+
10
+ .em-sizing
11
+ +em-size("width", 13px)
12
+ +em-size("margin", 99px, 11px)
13
+
14
+ .em-sizing-hack
15
+ +em-size-hacked("width", 13px)
16
+
@@ -0,0 +1,26 @@
1
+ require File.dirname(__FILE__)+'/test_helper'
2
+ require 'compass'
3
+
4
+ class SassExtensionsTest < Test::Unit::TestCase
5
+ def test_simple
6
+ assert_equal "a b", nest("a", "b")
7
+ end
8
+ def test_left_side_expansion
9
+ assert_equal "a c, b c", nest("a, b", "c")
10
+ end
11
+ def test_right_side_expansion
12
+ assert_equal "a b, a c", nest("a", "b, c")
13
+ end
14
+ def test_both_sides_expansion
15
+ assert_equal "a c, a d, b c, b d", nest("a, b", "c, d")
16
+ end
17
+ def test_three_selectors_expansion
18
+ assert_equal "a b, a c, a d", nest("a", "b, c, d")
19
+ end
20
+ def test_third_argument_expansion
21
+ assert_equal "a b e, a b f, a c e, a c f, a d e, a d f", nest("a", "b, c, d", "e, f")
22
+ end
23
+ def nest(*arguments)
24
+ Sass::Script::Functions.nest(*arguments.map{|a| Sass::Script::String.new(a)}).to_s
25
+ end
26
+ end