compass-edge 0.9.4 → 0.9.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (187) hide show
  1. data/CHANGELOG.markdown +32 -2
  2. data/README.markdown +12 -2
  3. data/REVISION +1 -1
  4. data/Rakefile +3 -1
  5. data/VERSION.yml +1 -2
  6. data/examples/blueprint_default/index.html.haml +3 -3
  7. data/examples/blueprint_default/parts/forms.html.haml +2 -0
  8. data/examples/blueprint_default/src/screen.sass +1 -1
  9. data/examples/blueprint_plugins/index.html.haml +6 -6
  10. data/examples/blueprint_plugins/src/buttons.sass +2 -2
  11. data/examples/blueprint_plugins/src/link_icons.sass +1 -1
  12. data/examples/blueprint_plugins/src/rtl_screen.sass +3 -3
  13. data/examples/blueprint_plugins/src/screen.sass +2 -2
  14. data/examples/blueprint_semantic/src/liquid.sass +4 -4
  15. data/examples/blueprint_semantic/src/screen.sass +3 -3
  16. data/examples/compass/bootstrap.rb +3 -0
  17. data/examples/compass/extensions/yui/stylesheets/_yui.sass +7 -0
  18. data/examples/compass/extensions/yui/stylesheets/yui/modules/_base.sass +70 -0
  19. data/examples/compass/extensions/yui/stylesheets/yui/modules/_fonts.sass +45 -0
  20. data/examples/compass/extensions/yui/stylesheets/yui/modules/_grids.sass +385 -0
  21. data/examples/compass/extensions/yui/stylesheets/yui/modules/_reset.sass +61 -0
  22. data/examples/compass/extensions/yui/templates/project/manifest.rb +1 -0
  23. data/examples/compass/extensions/yui/templates/project/screen.sass +4 -0
  24. data/examples/compass/src/utilities.sass +2 -2
  25. data/examples/css3/config.rb +6 -0
  26. data/examples/css3/extensions/fancy-fonts/templates/project/Vtks Revolt.ttf +0 -0
  27. data/examples/css3/extensions/fancy-fonts/templates/project/angelina.ttf +0 -0
  28. data/examples/css3/extensions/fancy-fonts/templates/project/fancy-fonts.sass +7 -0
  29. data/examples/css3/extensions/fancy-fonts/templates/project/manifest.rb +5 -0
  30. data/examples/css3/images/fresh-peas.jpg +0 -0
  31. data/examples/css3/index.html.haml +55 -0
  32. data/examples/css3/src/_base.sass +14 -0
  33. data/examples/css3/src/fancy-fonts.sass +7 -0
  34. data/examples/css3/src/gradient.sass +10 -0
  35. data/examples/css3/src/main.sass +80 -0
  36. data/examples/css3/stylesheets/fonts/Vtks Revolt.ttf +0 -0
  37. data/examples/css3/stylesheets/fonts/angelina.ttf +0 -0
  38. data/examples/downloader.rb +2 -2
  39. data/examples/ninesixty/extensions/ninesixty/README.mkdn +56 -0
  40. data/examples/ninesixty/extensions/ninesixty/compass-960-plugin.gemspec +36 -0
  41. data/examples/ninesixty/extensions/ninesixty/lib/ninesixty.rb +1 -0
  42. data/examples/ninesixty/extensions/ninesixty/lib/ninesixty/compass_plugin.rb +5 -0
  43. data/examples/ninesixty/extensions/ninesixty/sass/960/_grid.sass +64 -0
  44. data/examples/ninesixty/extensions/ninesixty/sass/960/_text.sass +59 -0
  45. data/examples/ninesixty/extensions/ninesixty/templates/project/grid.sass +34 -0
  46. data/examples/ninesixty/extensions/ninesixty/templates/project/manifest.rb +2 -0
  47. data/examples/ninesixty/extensions/ninesixty/templates/project/text.sass +10 -0
  48. data/examples/susy/bootstrap.rb +3 -0
  49. data/examples/susy/config.rb +9 -0
  50. data/examples/susy/extensions/susy/LICENSE.txt +28 -0
  51. data/examples/susy/extensions/susy/README.mkdn +235 -0
  52. data/examples/susy/extensions/susy/compass-susy-plugin.gemspec +35 -0
  53. data/examples/susy/extensions/susy/docs/tutorial/build.sh +141 -0
  54. data/examples/susy/extensions/susy/docs/tutorial/code/01_target/src/_defaults.sass +100 -0
  55. data/examples/susy/extensions/susy/docs/tutorial/code/01_target/src/screen.sass +98 -0
  56. data/examples/susy/extensions/susy/docs/tutorial/code/02_container/src/_defaults.sass +147 -0
  57. data/examples/susy/extensions/susy/docs/tutorial/code/02_container/src/screen.sass +19 -0
  58. data/examples/susy/extensions/susy/docs/tutorial/code/03_structure/src/_defaults.sass +147 -0
  59. data/examples/susy/extensions/susy/docs/tutorial/code/03_structure/src/screen.sass +48 -0
  60. data/examples/susy/extensions/susy/docs/tutorial/code/_common/config.rb +14 -0
  61. data/examples/susy/extensions/susy/docs/tutorial/code/_common/images/grid.png +0 -0
  62. data/examples/susy/extensions/susy/docs/tutorial/code/_common/images/susy_logo.png +0 -0
  63. data/examples/susy/extensions/susy/docs/tutorial/code/_common/src/_base.sass +63 -0
  64. data/examples/susy/extensions/susy/docs/tutorial/code/_tools/Markdown.pl +1450 -0
  65. data/examples/susy/extensions/susy/docs/tutorial/code/site/src/_defaults.sass +100 -0
  66. data/examples/susy/extensions/susy/docs/tutorial/code/site/src/screen.sass +91 -0
  67. data/examples/susy/extensions/susy/docs/tutorial/figures/susy_element.png +0 -0
  68. data/examples/susy/extensions/susy/docs/tutorial/figures/susy_grid.png +0 -0
  69. data/examples/susy/extensions/susy/docs/tutorial/index.mkdn +301 -0
  70. data/examples/susy/extensions/susy/lib/susy.rb +2 -0
  71. data/examples/susy/extensions/susy/lib/susy/compass_plugin.rb +5 -0
  72. data/examples/susy/extensions/susy/lib/susy/sass_extensions.rb +79 -0
  73. data/examples/susy/extensions/susy/sass/susy/_grid.sass +128 -0
  74. data/examples/susy/extensions/susy/sass/susy/_reset.sass +7 -0
  75. data/examples/susy/extensions/susy/sass/susy/_susy.sass +23 -0
  76. data/examples/susy/extensions/susy/sass/susy/_text.sass +15 -0
  77. data/examples/susy/extensions/susy/sass/susy/_utils.sass +81 -0
  78. data/examples/susy/extensions/susy/templates/project/_base.sass +62 -0
  79. data/examples/susy/extensions/susy/templates/project/_defaults.sass +147 -0
  80. data/examples/susy/extensions/susy/templates/project/ie.sass +9 -0
  81. data/examples/susy/extensions/susy/templates/project/manifest.rb +5 -0
  82. data/examples/susy/extensions/susy/templates/project/print.sass +7 -0
  83. data/examples/susy/extensions/susy/templates/project/screen.sass +44 -0
  84. data/examples/susy/src/_base.sass +62 -0
  85. data/examples/susy/src/_defaults.sass +148 -0
  86. data/examples/susy/src/screen.sass +114 -0
  87. data/examples/yui/extensions/yui/stylesheets/_yui.sass +7 -0
  88. data/examples/yui/extensions/yui/stylesheets/yui/modules/_base.sass +70 -0
  89. data/examples/yui/extensions/yui/stylesheets/yui/modules/_fonts.sass +45 -0
  90. data/examples/yui/extensions/yui/stylesheets/yui/modules/_grids.sass +385 -0
  91. data/examples/yui/extensions/yui/stylesheets/yui/modules/_reset.sass +61 -0
  92. data/examples/yui/extensions/yui/templates/project/manifest.rb +1 -0
  93. data/examples/yui/extensions/yui/templates/project/screen.sass +4 -0
  94. data/lib/compass/app_integration/rails/configuration_defaults.rb +9 -1
  95. data/lib/compass/commands/watch_project.rb +1 -1
  96. data/lib/compass/compiler.rb +9 -1
  97. data/lib/compass/configuration.rb +23 -18
  98. data/lib/compass/configuration/adapters.rb +1 -1
  99. data/lib/compass/configuration/defaults.rb +30 -0
  100. data/lib/compass/frameworks.rb +1 -1
  101. data/lib/compass/frameworks/blueprint/stylesheets/_blueprint.sass +29 -1
  102. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_buttons.sass +84 -0
  103. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_colors.sass +33 -0
  104. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_debug.sass +9 -0
  105. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_fancy_type.sass +82 -0
  106. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_form.sass +56 -0
  107. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_grid.sass +179 -0
  108. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_ie.sass +2 -2
  109. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_interaction.sass +58 -0
  110. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_link_icons.sass +44 -0
  111. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_liquid.sass +141 -0
  112. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_print.sass +1 -4
  113. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_reset.sass +57 -2
  114. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_rtl.sass +123 -0
  115. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_scaffolding.sass +49 -0
  116. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_screen.sass +2 -29
  117. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_typography.sass +162 -0
  118. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/_utilities.sass +37 -0
  119. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_buttons.sass +2 -84
  120. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_colors.sass +2 -33
  121. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_debug.sass +2 -9
  122. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_fancy_type.sass +2 -82
  123. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_form.sass +2 -55
  124. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_grid.sass +2 -178
  125. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_interaction.sass +2 -58
  126. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_link_icons.sass +2 -44
  127. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_liquid.sass +2 -140
  128. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_reset.sass +2 -56
  129. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_rtl.sass +2 -122
  130. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_scaffolding.sass +2 -47
  131. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_typography.sass +2 -160
  132. data/lib/compass/frameworks/blueprint/stylesheets/blueprint/modules/_utilities.sass +2 -37
  133. data/lib/compass/frameworks/blueprint/templates/buttons/buttons.sass +2 -2
  134. data/lib/compass/frameworks/blueprint/templates/link_icons/link_icons.sass +1 -1
  135. data/lib/compass/frameworks/blueprint/templates/project/screen.sass +1 -7
  136. data/lib/compass/frameworks/blueprint/templates/project/welcome.html.haml +5 -2
  137. data/lib/compass/frameworks/compass/stylesheets/compass/_css3.sass +8 -0
  138. data/lib/compass/frameworks/compass/stylesheets/compass/css3/_background_clip.sass +16 -0
  139. data/lib/compass/frameworks/compass/stylesheets/compass/css3/_background_origin.sass +18 -0
  140. data/lib/compass/frameworks/compass/stylesheets/compass/css3/_background_size.sass +14 -0
  141. data/lib/compass/frameworks/compass/stylesheets/compass/css3/_box_shadow.sass +18 -10
  142. data/lib/compass/frameworks/compass/stylesheets/compass/css3/_font_face.sass +31 -0
  143. data/lib/compass/frameworks/compass/stylesheets/compass/css3/_gradient.sass +40 -0
  144. data/lib/compass/frameworks/compass/stylesheets/compass/css3/_text_shadow.sass +15 -0
  145. data/lib/compass/frameworks/compass/stylesheets/compass/css3/_transform.sass +60 -0
  146. data/lib/compass/frameworks/compass/stylesheets/compass/css3/_transition.sass +57 -0
  147. data/lib/compass/grid_builder.rb +1 -1
  148. data/lib/compass/installers/base.rb +5 -1
  149. data/lib/compass/installers/manifest.rb +1 -0
  150. data/lib/compass/logger.rb +28 -2
  151. data/lib/compass/sass_extensions/functions.rb +3 -1
  152. data/lib/compass/sass_extensions/functions/color_stop.rb +10 -0
  153. data/lib/compass/sass_extensions/functions/enumerate.rb +2 -2
  154. data/lib/compass/sass_extensions/functions/font_files.rb +11 -0
  155. data/lib/compass/sass_extensions/functions/inline_image.rb +22 -1
  156. data/lib/compass/sass_extensions/functions/urls.rb +20 -0
  157. data/lib/vendor/fssm.rb +19 -6
  158. data/lib/vendor/fssm/backends/fsevents.rb +19 -60
  159. data/lib/vendor/fssm/backends/polling.rb +20 -18
  160. data/lib/vendor/fssm/cache.rb +193 -0
  161. data/lib/vendor/fssm/ext.rb +30 -0
  162. data/lib/vendor/fssm/fsevents.rb +129 -0
  163. data/lib/vendor/fssm/monitor.rb +10 -6
  164. data/lib/vendor/fssm/path.rb +24 -21
  165. data/lib/vendor/fssm/state.rb +37 -29
  166. data/lib/vendor/fssm/support.rb +3 -7
  167. data/lib/vendor/fssm/tree.rb +176 -0
  168. data/test/command_line_helper.rb +8 -4
  169. data/test/command_line_test.rb +2 -2
  170. data/test/compass_test.rb +14 -4
  171. data/test/configuration_test.rb +5 -5
  172. data/test/fixtures/stylesheets/blueprint/css/typography.css +5 -3
  173. data/test/fixtures/stylesheets/blueprint/sass/screen.sass +1 -1
  174. data/test/fixtures/stylesheets/blueprint/sass/typography.sass +2 -2
  175. data/test/fixtures/stylesheets/compass/css/print.css +2 -8
  176. data/test/fixtures/stylesheets/image_urls/css/screen.css +2 -0
  177. data/test/fixtures/stylesheets/relative/assets/images/testing.png +0 -0
  178. data/test/fixtures/stylesheets/relative/config.rb +9 -0
  179. data/test/fixtures/stylesheets/relative/css/ie.css +1 -0
  180. data/test/fixtures/stylesheets/relative/css/print.css +1 -0
  181. data/test/fixtures/stylesheets/relative/css/screen.css +1 -0
  182. data/test/fixtures/stylesheets/relative/sass/ie.sass +6 -0
  183. data/test/fixtures/stylesheets/relative/sass/print.sass +6 -0
  184. data/test/fixtures/stylesheets/relative/sass/screen.sass +3 -0
  185. data/test/rails_integration_test.rb +1 -1
  186. data/test/sass_extensions_test.rb +2 -2
  187. metadata +120 -2
@@ -0,0 +1,59 @@
1
+ !ninesixty_font_family ||= "Helvetica, Arial, 'Liberation Sans', FreeSans, sans-serif"
2
+
3
+ =text(!font_family = !ninesixty_font_family)
4
+ body
5
+ :font= "13px/1.5" !font_family
6
+
7
+ a:focus
8
+ :outline 1px dotted invert
9
+
10
+ hr
11
+ :border-color #ccc
12
+ :border-style solid
13
+ :border-width 1px 0 0
14
+ :clear both
15
+ :height 0
16
+
17
+ h1
18
+ :font-size 25px
19
+
20
+ h2
21
+ :font-size 23px
22
+
23
+ h3
24
+ :font-size 21px
25
+
26
+ h4
27
+ :font-size 19px
28
+
29
+ h5
30
+ :font-size 17px
31
+
32
+ h6
33
+ :font-size 15px
34
+
35
+ ol
36
+ :list-style decimal
37
+
38
+ ul
39
+ :list-style square
40
+
41
+ li
42
+ :margin-left 30px
43
+
44
+ p,
45
+ dl,
46
+ hr,
47
+ h1,
48
+ h2,
49
+ h3,
50
+ h4,
51
+ h5,
52
+ h6,
53
+ ol,
54
+ ul,
55
+ pre,
56
+ table,
57
+ address,
58
+ fieldset
59
+ :margin-bottom 20px
@@ -0,0 +1,34 @@
1
+ /*
2
+ 960 Grid System ~ Core CSS.
3
+ Learn more ~ http://960.gs/
4
+
5
+ Licensed under GPL and MIT.
6
+
7
+ @import compass/utilities/general/reset.sass
8
+ @import 960/grid.sass
9
+
10
+ +global-reset
11
+
12
+ // The following generates the default grids provided by the css version of 960.gs
13
+ .container_12
14
+ +grid-system(12)
15
+
16
+ .container_16
17
+ +grid-system(16)
18
+
19
+ // But most compass users prefer to construct semantic layouts like so (two column layout with header and footer):
20
+
21
+ !ninesixty_columns = 24
22
+ .two-column
23
+ +grid-container
24
+ #header,
25
+ #footer,
26
+ #sidebar,
27
+ #main-content
28
+ +grid-unit-base
29
+ #header, #footer
30
+ +grid-width(24)
31
+ #sidebar
32
+ +grid-width(8)
33
+ #main-content
34
+ +grid-width(16)
@@ -0,0 +1,2 @@
1
+ stylesheet 'grid.sass', :media => "screen, projection"
2
+ stylesheet 'text.sass', :media => "screen, projection"
@@ -0,0 +1,10 @@
1
+ /*
2
+ 960 Grid System ~ Text CSS.
3
+ Learn more ~ http://960.gs/
4
+
5
+ Licensed under GPL and MIT.
6
+
7
+
8
+ @import 960/text.sass
9
+
10
+ +text
@@ -0,0 +1,3 @@
1
+ require File.join(File.dirname(__FILE__), '..', 'downloader')
2
+
3
+ install_from_github('ericam', 'compass-susy-plugin', 'susy', 'edge')
@@ -0,0 +1,9 @@
1
+ project_type = :stand_alone
2
+ # Set this to the root of your project when deployed:
3
+ http_path = "/"
4
+ css_dir = "stylesheets"
5
+ sass_dir = "src"
6
+ images_dir = "images"
7
+ output_style = :compact
8
+ # To enable relative paths to assets via compass helper functions. Uncomment:
9
+ # relative_assets = true
@@ -0,0 +1,28 @@
1
+ Copyright (c) 2009, Eric Meyer
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without
5
+ modification, are permitted provided that the following conditions are
6
+ met:
7
+
8
+ * Redistributions of source code must retain the above copyright
9
+ notice, this list of conditions and the following disclaimer.
10
+ * Redistributions in binary form must reproduce the above
11
+ copyright notice, this list of conditions and the following
12
+ disclaimer in the documentation and/or other materials provided
13
+ with the distribution.
14
+ * Neither the name of the author nor the names of other
15
+ contributors may be used to endorse or promote products derived
16
+ from this software without specific prior written permission.
17
+
18
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,235 @@
1
+ Susy - Compass Plugin
2
+ =====================
3
+
4
+ Susy is a semantic CSS framework creator entirely native to
5
+ [Compass](http://compass-style.org/).
6
+ Susy is an expert at fluid grids in an elastic (or fluid, or fixed) shell that
7
+ will never activate that bloody side-scroll bar. Susy sets your width on the
8
+ outer element (`container`), adds a `max-width` of `100%` and builds the rest
9
+ of your grid in percentages. The philosophy and technique are based on
10
+ [Natalie Downe](http://natbat.net/)'s "[CSS
11
+ Systems](http://natbat.net/2008/Sep/28/css-systems/)" - which introduces
12
+ difficult math in the service of beautiful structure. With the power of
13
+ Compass/Sass, Susy will do that math for you.
14
+
15
+ Using simple mixins, columns can be created, suffixed, prefixed, and nested
16
+ easily - and always in flexible percentages.
17
+
18
+ Install
19
+ =======
20
+
21
+ sudo gem sources --add http://gemcutter.org/
22
+ sudo gem install compass-susy-plugin
23
+
24
+ Create a Susy-based Compass Project
25
+ ===================================
26
+
27
+ compass -r susy -f susy <project name>
28
+
29
+ Then edit your `_base.sass`, `_defaults.sass`, `screen.sass` and `print.sass`
30
+ files accordingly. A reset is added automatically, and includes help for some
31
+ HTML5 elements.
32
+
33
+ Philosophy and Goals
34
+ --------------------
35
+
36
+ The method comes from [Natalie Downe](http://natbat.net/)'s "[CSS
37
+ Systems](http://natbat.net/2008/Sep/28/css-systems/)", but I'll cover it here.
38
+
39
+ It is important for accessibility and usability that we are:
40
+
41
+ * Responsive to text sizing: In order for our site to be accessible we need to
42
+ allow different font-sizes to be set by the client. In order to maintain
43
+ design integrity of proportions and line-lengths, the grid needs to respond
44
+ to those sizes.
45
+
46
+ * Responsive to window sizing: In order to maintain usability across
47
+ platforms/monitors, our grid needs to respond to the size of the viewport.
48
+ This is mainly an issue as the viewport shrinks and we are given a
49
+ side-scroll bar. No one likes that. On the large end our design integrity
50
+ and line lengths are more important than taking up all the possible space.
51
+
52
+ In order to achieve both goals we need to combine the best of the elastic
53
+ (em-based) and fluid (%-based) models. The solution is simple: First we build
54
+ a fluid grid, then place it inside an elastic shell, and apply a maximum width
55
+ to that shell so that it never exceeds the size of the viewport. It's simple
56
+ in theory, but daunting in practice, as you constantly have to adjust your
57
+ math based on the context.
58
+
59
+ But Susy harnesses the power of Compass and Sass to do all the math for you.
60
+
61
+ Grid Basics
62
+ ===========
63
+
64
+ * Set up your default grid values (total columns, column width, gutter
65
+ width, side gutter width), your base font size, and important mixins
66
+ in `_base.sass`.
67
+
68
+ * Set defaults for all the important HTML tags in `_defaults.sass`. It's
69
+ better than using the browser defaults. And better than using ours.
70
+
71
+ * Create your grid in `screen.sass`: apply the `+susy` mixin to the `body`
72
+ element and the `+container` mixin to the element that contains the page
73
+ grid.
74
+
75
+ * Use the `+columns` mixin to declare the width in columns of an element,
76
+ or `+full` for any element spanning the full width of its context.
77
+
78
+ * Use `+alpha` and `+omega` to declare elements which include the first or
79
+ last column within their parent element (`+full` to declare both `+alpha`
80
+ and `+omega`). Note: `+alpha` is actually only needed in the very top level,
81
+ and does nothing in nested contexts. Neither is needed on a `+full` element.
82
+
83
+ * Use `+prefix` or `+suffix` to give the width (in columns) of an elements
84
+ left or right margin, or `+pad` to give both `+prefix` and `+suffix` at
85
+ once.
86
+
87
+ * In nested contexts, all of these mixins take an extra final argument, the
88
+ width in columns of the parent (nesting) element.
89
+
90
+ That's it for the basics! Here's a sample Susy grid layout:
91
+
92
+ body
93
+ +susy
94
+
95
+ #page
96
+ +container
97
+
98
+ #brand
99
+ +full
100
+ +pad(1,1)
101
+ h1
102
+ +full(8)
103
+ +pad(1,2,8)
104
+
105
+ #nav
106
+ +columns(2)
107
+ +alpha
108
+
109
+ #content
110
+ +columns(8)
111
+ +omega
112
+ #description
113
+ +columns(5,8)
114
+ #credit
115
+ +columns(3,8)
116
+ +omega(8)
117
+
118
+ Tutorial
119
+ ========
120
+
121
+ For more details, read [the tutorial](http://www.oddbird.net/susy/tutorial/).
122
+ It's also included with Susy in the docs/ folder.
123
+
124
+ Extra Utility Mixins
125
+ =====================
126
+
127
+ Extra utilities are included in Susy's `utils.sass` file, with additional list
128
+ options, experimental (CSS3/proprietary) CSS, and more.
129
+
130
+ * `+show-grid(!src)` - Repeat the specified grid image on an element. Good for
131
+ testing your baseline grid.
132
+
133
+ * `+inline-block-list([!horizontalpadding])` - Make list items inline-block
134
+ when floating just won't do the trick (if you need them centered or right).
135
+
136
+ * `+hide` - Hide content from visual browsers while keeping accessability
137
+ intact.
138
+
139
+ * `+skip-link([!top = 0, !right, !bottom, !left])` - Hide a link, and then show
140
+ it again on focus. the TRBL settings allow you to place it absolutely on
141
+ display. Default will be top left of the positioning context.
142
+
143
+ And then the fun stuff in `_CSS3.sass`:
144
+
145
+ * `+opacity(!opacity)` - add cross-browser opacity settings (takes a range of
146
+ 0 to 1). `+transprent` and `+opaque` are available as shortcuts.
147
+
148
+ * `+border-radius(!radius)` - Rounded corners in supporting browsers.
149
+ `+border-bottom-left-radius` etc. all work.
150
+
151
+ * `+box-sizing(!model)` - Set the box sizing model in supporting browsers.
152
+
153
+ * `+box-shadow(!verticaloffset, !horizontaloffset, !blur, !color)` -
154
+ Box-shadow in supporting browsers.
155
+
156
+ * `+column-count(!number)`, `+column-gap(!length)`, `+column-width(!length)`,
157
+ and `+column-rule(!width, !style, !color)` - CSS columns in supporting
158
+ browsers.
159
+
160
+ Advanced Options
161
+ ================
162
+
163
+ Susy is built for flexibility, so that you always write the code you want to
164
+ write. While everything should 'just work' out of the box, there are plenty of
165
+ advanced options hidden inside. Here's a few:
166
+
167
+ * `!hacks` is a boolean constant that you can set in your base.sass file to
168
+ choose between using targeted hacks for IE (a variation of the star hack in
169
+ most cases) in your screen.css, or using a conditional-comment targeted
170
+ ie.css. All the needed mixins are available for either setting. `!hacks` is
171
+ true by default so there is no extra work maintaining multiple files unless
172
+ you want to.
173
+
174
+ Example 1:
175
+
176
+ !hacks = true
177
+
178
+ #nav
179
+ +inline-block-list
180
+
181
+ Example 2:
182
+
183
+ !hacks = false
184
+
185
+ (in screen.sass)
186
+ #nav
187
+ +inline-block-list
188
+
189
+ (in ie.sass)
190
+ #nav li
191
+ +ie-inline-block
192
+
193
+ It requires more maintenance on your part, but the result is a
194
+ hack-free output.
195
+
196
+ The Susy mixins that use either hacks or targeted mixins are
197
+ `+omega` (`+ie-omega([!right-floated = false])`), `+inline-block`
198
+ (`+ie-inline-block`), and `+inline-block-list` which sets
199
+ `+inline-block` on the list items.
200
+
201
+ The ie-specific mixins only add the needed ie-specific adjustments,
202
+ so they need to be used in addition to their counterparts, not on
203
+ their own.
204
+
205
+ * `gutter(!context)` is a function that you can call at any time to return the
206
+ size of a gutter in your given context using percentages. The number is
207
+ returned without units so that you can perform math on it. In order to use
208
+ it, you will have to add "%" to it.
209
+
210
+ Example:
211
+
212
+ #nav
213
+ padding-right= gutter(5) + "%"
214
+
215
+ * `columns(!number, !context)` returns the span of `!number` columns in
216
+ `!context` as a percentage (again without the units declared). This span
217
+ includes any gutters between the columns spanned.
218
+
219
+ Example:
220
+
221
+ #nav
222
+ padding-left= columns(3,5) + "%"
223
+
224
+ * `side_gutter()` is also available and takes no arguments since it is always
225
+ used at the top nesting level.
226
+
227
+ * `px2em()` takes one numeric argument representing the number of pixels you
228
+ want to mimic. The return is an em value (with no units declared) that
229
+ approximates that number of pixels. Useful for keeping your entire design
230
+ fluid.
231
+
232
+ Example:
233
+
234
+ #nav
235
+ border-bottom= px2em(2) + "em"
@@ -0,0 +1,35 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{compass-susy-plugin}
5
+ s.version = "0.7"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["Eric Meyer"]
9
+ s.date = %q{2009-07-12}
10
+ s.description = %q{Susy is a ground-up native Compass plugin grid system that takes full advantage of Sass' capabilities to remove the tedium from grid-based web design.}
11
+ s.email = %q{eric@oddbird.net}
12
+ s.extra_rdoc_files = ["lib/susy/compass_plugin.rb", "lib/susy/sass_extensions.rb", "lib/susy.rb", "README.mkdn"]
13
+ s.files = ["lib/susy/compass_plugin.rb", "lib/susy/sass_extensions.rb", "lib/susy.rb", "Manifest", "Rakefile", "README.mkdn", "sass/susy/_grid.sass", "sass/susy/_utils.sass", "sass/susy/_text.sass", "sass/susy/_susy.sass", "templates/project/_base.sass", "templates/project/screen.sass", "templates/project/print.sass", "templates/project/ie.sass", "templates/project/manifest.rb", "VERSION", "LICENSE.txt", "docs/tutorial/index.mkdn", "docs/tutorial/figures/susy_element.png", "docs/tutorial/figures/susy_grid.png", "compass-susy-plugin.gemspec"]
14
+ s.homepage = %q{http://github.com/ericam/compass-susy-plugin}
15
+ s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Compass-Susy-plugin", "--main", "README.mkdn"]
16
+ s.require_paths = ["lib"]
17
+ s.rubygems_version = %q{1.3.3}
18
+ s.summary = %q{A Compass grid system plugin.}
19
+
20
+ if s.respond_to? :specification_version then
21
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
22
+ s.specification_version = 3
23
+
24
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
25
+ s.add_runtime_dependency(%q<compass>, [">= 0"])
26
+ s.add_development_dependency(%q<echoe>, [">= 0"])
27
+ else
28
+ s.add_dependency(%q<compass>, [">= 0"])
29
+ s.add_dependency(%q<echoe>, [">= 0"])
30
+ end
31
+ else
32
+ s.add_dependency(%q<compass>, [">= 0"])
33
+ s.add_dependency(%q<echoe>, [">= 0"])
34
+ end
35
+ end
@@ -0,0 +1,141 @@
1
+ #!/bin/bash
2
+
3
+ tut_dir=`dirname ${0}`
4
+ cd "${tut_dir}"
5
+ tut_dir=`pwd`
6
+
7
+ if [ ! -d "_build" ]; then
8
+ mkdir "_build"
9
+ fi
10
+
11
+ cp -pR code/* _build/
12
+ cd _build
13
+
14
+ # create activate and deactivate scripts
15
+ cat > activate <<EOF
16
+ #!/bin/bash
17
+
18
+ cd "${tut_dir}/_build"
19
+ pushd ../../../lib > /dev/null
20
+ libdir=\`pwd\`
21
+ popd > /dev/null
22
+
23
+ export OLD_RUBYLIB=\${RUBYLIB}
24
+ export RUBYLIB=\${libdir}
25
+ EOF
26
+
27
+ cat > deactivate <<EOF
28
+ #!/bin/bash
29
+
30
+ export RUBYLIB=\${OLD_RUBYLIB}
31
+ export OLD_RUBYLIB=
32
+ EOF
33
+
34
+ # activate so we can run compass later
35
+ . activate
36
+
37
+ # create the site index.html and place it in _common
38
+ cat _tools/head.tpl.html \
39
+ | sed 's/{{ STYLE_PATH }}//; s/{{ BODY_CLASS }}/home/; s/{{ TITLE }}/A Grid Plugin for Compass/;' \
40
+ > _tools/home_head.html
41
+ cat _tools/foot.tpl.html \
42
+ | sed 's/{{ STYLE_PATH }}//;' \
43
+ > _tools/home_foot.html
44
+ cat _tools/home_head.html _tools/home_content.html _tools/home_foot.html > _common/index.html
45
+
46
+ # copy the tutorial figures into site/
47
+ if [ ! -d "site/tutorial" ]; then
48
+ mkdir site/tutorial
49
+ fi
50
+ cp -pR ../figures site/tutorial/
51
+
52
+ # create the tutorial index.html
53
+ perl _tools/Markdown.pl --html4tags ../index.mkdn > _tools/tutorial_content.html
54
+ cat _tools/head.tpl.html \
55
+ | sed 's/{{ STYLE_PATH }}/..\//; s/{{ BODY_CLASS }}/tutorial/; s/{{ TITLE }}/A Tutorial/;' \
56
+ > _tools/tutorial_head.html
57
+ cat _tools/foot.tpl.html \
58
+ | sed 's/{{ STYLE_PATH }}/..\//;' \
59
+ > _tools/tutorial_foot.html
60
+ cat _tools/tutorial_head.html _tools/tutorial_content.html _tools/tutorial_foot.html > site/tutorial/index.html
61
+
62
+ # remove _tools
63
+ rm -r _tools/
64
+
65
+ # copy files in _common into each stage; also create diff.sh and use.sh
66
+ for d in 01_target 02_container 03_structure site; do
67
+ cp -pR _common/* "${d}/"
68
+ pushd "${d}" > /dev/null
69
+ compass > /dev/null
70
+ popd > /dev/null
71
+ cat > "${d}/diff.sh" <<EOF
72
+ #!/bin/bash
73
+
74
+ pushd \`dirname \${0}\` > /dev/null
75
+ name=\`basename \\\`pwd\\\`\`
76
+ diff -r ${tut_dir}/code/\${name}/src/ src/
77
+ popd > /dev/null
78
+ EOF
79
+ chmod 755 "${d}/diff.sh"
80
+ cat > "${d}/use.sh" <<EOF
81
+ #!/bin/bash
82
+
83
+ pushd \`dirname \${0}\` > /dev/null
84
+ name=\`basename \\\`pwd\\\`\`
85
+ dest="${tut_dir}/code/\${name}/\${1}"
86
+ if [ ! -f "\${dest}" ]; then
87
+ echo "File \${dest} does not exist; does this file belong in _common?"
88
+ exit 1
89
+ fi
90
+ cp "\${1}" "\${dest}"
91
+ popd > /dev/null
92
+ EOF
93
+ chmod 755 "${d}/use.sh"
94
+ done
95
+
96
+ # got everything out of common, remove it
97
+ rm -r _common
98
+
99
+ # move all stages into site/tutorial/
100
+ for d in 01_target 02_container 03_structure; do
101
+ cp -pR "${d}" site/tutorial/
102
+ rm -r "${d}"
103
+ done
104
+
105
+ # create install script
106
+ cat > install.sh <<EOF
107
+ #!/bin/bash
108
+
109
+ if [ -z "\${1}" ]; then
110
+ echo "Please provide a destination directory to install Susy site into."
111
+ exit 1
112
+ fi
113
+
114
+ if [ -e "\${1}" ]; then
115
+ read -n 1 -p "Destination \${1} already exists, remove it (y/n)?" yesno
116
+ echo
117
+ echo
118
+ if [ \$yesno != "y" ]; then
119
+ echo "Aborting."
120
+ exit 1
121
+ fi
122
+ rm -r \${1}
123
+ fi
124
+
125
+
126
+ echo "Installing Susy site to \${1}."
127
+
128
+ pushd \`dirname \${0}\` > /dev/null
129
+ base=\`pwd\`
130
+ popd > /dev/null
131
+ cp -pR "\${base}/site/" "\${1}" || exit 1
132
+
133
+ find "\${1}" -name '*.sh' -exec rm {} \;
134
+ echo "Installed."
135
+ EOF
136
+ chmod 755 install.sh
137
+
138
+ # if we got an argument, go ahead and install there
139
+ if [ ! -z "${1}" ]; then
140
+ ./install.sh "${1}"
141
+ fi