bsherman-compass 0.5.2

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.
Files changed (155) hide show
  1. data/Manifest +178 -0
  2. data/README.markdown +17 -0
  3. data/Rakefile +98 -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_plugins/index.html +60 -0
  15. data/examples/blueprint_plugins/parts/fancy_type.html +84 -0
  16. data/examples/blueprint_plugins/parts/test-small.jpg +0 -0
  17. data/examples/blueprint_plugins/parts/test.jpg +0 -0
  18. data/examples/blueprint_plugins/parts/valid.png +0 -0
  19. data/examples/blueprint_semantic/index.html +68 -0
  20. data/examples/blueprint_semantic/parts/fancy_type.html +84 -0
  21. data/examples/blueprint_semantic/parts/liquid.html +84 -0
  22. data/examples/blueprint_semantic/parts/test-small.jpg +0 -0
  23. data/examples/blueprint_semantic/parts/test.jpg +0 -0
  24. data/examples/blueprint_semantic/parts/valid.png +0 -0
  25. data/examples/compass/compass.html +19 -0
  26. data/examples/compass/sticky_footer.html.haml +14 -0
  27. data/examples/compass/utilities.html.haml +141 -0
  28. data/examples/yui/divisions.html.haml +179 -0
  29. data/examples/yui/index.html.haml +19 -0
  30. data/examples/yui/sub_divisions.html.haml +169 -0
  31. data/examples/yui/templates.html.haml +54 -0
  32. data/examples/yui/test.jpg +0 -0
  33. data/examples/yui/typography.html.haml +132 -0
  34. data/frameworks/blueprint.rb +2 -0
  35. data/frameworks/blueprint/lib/blueprint/constants.rb +17 -0
  36. data/frameworks/blueprint/lib/blueprint/grid_builder.rb +54 -0
  37. data/frameworks/blueprint/stylesheets/_blueprint.sass +3 -0
  38. data/frameworks/blueprint/stylesheets/blueprint/_ie.sass +49 -0
  39. data/frameworks/blueprint/stylesheets/blueprint/_print.sass +82 -0
  40. data/frameworks/blueprint/stylesheets/blueprint/_screen.sass +15 -0
  41. data/frameworks/blueprint/stylesheets/blueprint/modules/_colors.sass +30 -0
  42. data/frameworks/blueprint/stylesheets/blueprint/modules/_debug.sass +9 -0
  43. data/frameworks/blueprint/stylesheets/blueprint/modules/_fancy_type.sass +81 -0
  44. data/frameworks/blueprint/stylesheets/blueprint/modules/_form.sass +43 -0
  45. data/frameworks/blueprint/stylesheets/blueprint/modules/_grid.sass +141 -0
  46. data/frameworks/blueprint/stylesheets/blueprint/modules/_interaction.sass +58 -0
  47. data/frameworks/blueprint/stylesheets/blueprint/modules/_liquid.sass +137 -0
  48. data/frameworks/blueprint/stylesheets/blueprint/modules/_scaffolding.sass +46 -0
  49. data/frameworks/blueprint/stylesheets/blueprint/modules/_typography.sass +154 -0
  50. data/frameworks/blueprint/stylesheets/blueprint/modules/_utilities.sass +37 -0
  51. data/frameworks/blueprint/templates/project/grid.png +0 -0
  52. data/frameworks/blueprint/templates/project/ie.sass +3 -0
  53. data/frameworks/blueprint/templates/project/manifest.rb +5 -0
  54. data/frameworks/blueprint/templates/project/print.sass +3 -0
  55. data/frameworks/blueprint/templates/project/screen.sass +8 -0
  56. data/frameworks/compass.rb +2 -0
  57. data/frameworks/compass/stylesheets/_compass.sass +1 -0
  58. data/frameworks/compass/stylesheets/compass/_layout.sass +1 -0
  59. data/frameworks/compass/stylesheets/compass/_reset.sass +3 -0
  60. data/frameworks/compass/stylesheets/compass/_utilities.sass +5 -0
  61. data/frameworks/compass/stylesheets/compass/layout/_sticky_footer.sass +17 -0
  62. data/frameworks/compass/stylesheets/compass/utilities/_general.sass +4 -0
  63. data/frameworks/compass/stylesheets/compass/utilities/_links.sass +3 -0
  64. data/frameworks/compass/stylesheets/compass/utilities/_lists.sass +3 -0
  65. data/frameworks/compass/stylesheets/compass/utilities/_print.sass +24 -0
  66. data/frameworks/compass/stylesheets/compass/utilities/_tables.sass +3 -0
  67. data/frameworks/compass/stylesheets/compass/utilities/_text.sass +2 -0
  68. data/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.sass +11 -0
  69. data/frameworks/compass/stylesheets/compass/utilities/general/_inline_block.sass +6 -0
  70. data/frameworks/compass/stylesheets/compass/utilities/general/_reset.sass +56 -0
  71. data/frameworks/compass/stylesheets/compass/utilities/general/_tabs.sass +0 -0
  72. data/frameworks/compass/stylesheets/compass/utilities/general/_tag_cloud.sass +19 -0
  73. data/frameworks/compass/stylesheets/compass/utilities/links/_hover_link.sass +5 -0
  74. data/frameworks/compass/stylesheets/compass/utilities/links/_link_colors.sass +24 -0
  75. data/frameworks/compass/stylesheets/compass/utilities/links/_unstyled_link.sass +5 -0
  76. data/frameworks/compass/stylesheets/compass/utilities/lists/_bullets.sass +21 -0
  77. data/frameworks/compass/stylesheets/compass/utilities/lists/_horizontal_list.sass +20 -0
  78. data/frameworks/compass/stylesheets/compass/utilities/lists/_inline_list.sass +29 -0
  79. data/frameworks/compass/stylesheets/compass/utilities/tables/_alternating_rows_and_columns.sass +20 -0
  80. data/frameworks/compass/stylesheets/compass/utilities/tables/_borders.sass +27 -0
  81. data/frameworks/compass/stylesheets/compass/utilities/tables/_scaffolding.sass +9 -0
  82. data/frameworks/compass/stylesheets/compass/utilities/text/_nowrap.sass +3 -0
  83. data/frameworks/compass/stylesheets/compass/utilities/text/_replacement.sass +10 -0
  84. data/frameworks/compass/templates/project/ie.sass +6 -0
  85. data/frameworks/compass/templates/project/manifest.rb +3 -0
  86. data/frameworks/compass/templates/project/print.sass +6 -0
  87. data/frameworks/compass/templates/project/screen.sass +7 -0
  88. data/frameworks/yui.rb +2 -0
  89. data/frameworks/yui/COPYRIGHT +15 -0
  90. data/frameworks/yui/stylesheets/_yui.sass +7 -0
  91. data/frameworks/yui/stylesheets/yui/modules/_base.sass +60 -0
  92. data/frameworks/yui/stylesheets/yui/modules/_fonts.sass +38 -0
  93. data/frameworks/yui/stylesheets/yui/modules/_grids.sass +341 -0
  94. data/frameworks/yui/templates/project/manifest.rb +1 -0
  95. data/frameworks/yui/templates/project/screen.sass +4 -0
  96. data/lib/compass.rb +39 -0
  97. data/lib/compass/actions.rb +92 -0
  98. data/lib/compass/commands/base.rb +29 -0
  99. data/lib/compass/commands/create_project.rb +41 -0
  100. data/lib/compass/commands/list_frameworks.rb +16 -0
  101. data/lib/compass/commands/print_version.rb +23 -0
  102. data/lib/compass/commands/project_base.rb +82 -0
  103. data/lib/compass/commands/update_project.rb +25 -0
  104. data/lib/compass/commands/watch_project.rb +53 -0
  105. data/lib/compass/commands/write_configuration.rb +37 -0
  106. data/lib/compass/compiler.rb +40 -0
  107. data/lib/compass/configuration.rb +167 -0
  108. data/lib/compass/core_ext.rb +12 -0
  109. data/lib/compass/errors.rb +7 -0
  110. data/lib/compass/exec.rb +184 -0
  111. data/lib/compass/frameworks.rb +29 -0
  112. data/lib/compass/installers.rb +5 -0
  113. data/lib/compass/installers/base.rb +135 -0
  114. data/lib/compass/installers/manifest.rb +57 -0
  115. data/lib/compass/installers/rails.rb +118 -0
  116. data/lib/compass/installers/stand_alone.rb +76 -0
  117. data/lib/compass/logger.rb +34 -0
  118. data/lib/compass/merb.rb +43 -0
  119. data/lib/compass/test_case.rb +37 -0
  120. data/lib/compass/validate.rb +13 -0
  121. data/lib/compass/validate/COPYRIGHT.html +93 -0
  122. data/lib/compass/validate/JIGSAW_COPYRIGHT +64 -0
  123. data/lib/compass/validate/README.html +83 -0
  124. data/lib/compass/validate/XERCES_COPYING.txt +56 -0
  125. data/lib/compass/validate/css-validator-javadoc.jar +0 -0
  126. data/lib/compass/validate/css-validator.jar +0 -0
  127. data/lib/compass/validate/jigsaw.jar +0 -0
  128. data/lib/compass/validate/xerces.jar +0 -0
  129. data/lib/compass/validator.rb +59 -0
  130. data/lib/compass/version.rb +66 -0
  131. data/lib/sass_extensions.rb +13 -0
  132. data/test/command_line_test.rb +147 -0
  133. data/test/compass_test.rb +148 -0
  134. data/test/configuration_test.rb +29 -0
  135. data/test/fixtures/stylesheets/blueprint/css/typography.css +159 -0
  136. data/test/fixtures/stylesheets/blueprint/sass/ie.sass +3 -0
  137. data/test/fixtures/stylesheets/blueprint/sass/print.sass +3 -0
  138. data/test/fixtures/stylesheets/blueprint/sass/screen.sass +17 -0
  139. data/test/fixtures/stylesheets/blueprint/sass/typography.sass +3 -0
  140. data/test/fixtures/stylesheets/compass/css/layout.css +14 -0
  141. data/test/fixtures/stylesheets/compass/css/print.css +19 -0
  142. data/test/fixtures/stylesheets/compass/css/reset.css +66 -0
  143. data/test/fixtures/stylesheets/compass/css/utilities.css +23 -0
  144. data/test/fixtures/stylesheets/compass/sass/layout.sass +3 -0
  145. data/test/fixtures/stylesheets/compass/sass/print.sass +5 -0
  146. data/test/fixtures/stylesheets/compass/sass/reset.sass +1 -0
  147. data/test/fixtures/stylesheets/compass/sass/utilities.sass +5 -0
  148. data/test/fixtures/stylesheets/yui/css/mixins.css +16 -0
  149. data/test/fixtures/stylesheets/yui/sass/base.sass +3 -0
  150. data/test/fixtures/stylesheets/yui/sass/fonts.sass +3 -0
  151. data/test/fixtures/stylesheets/yui/sass/grids.sass +3 -0
  152. data/test/fixtures/stylesheets/yui/sass/mixins.sass +16 -0
  153. data/test/sass_extensions_test.rb +26 -0
  154. data/test/test_helper.rb +47 -0
  155. metadata +295 -0
@@ -0,0 +1,3 @@
1
+ @import blueprint/screen.sass
2
+ @import blueprint/print.sass
3
+ @import blueprint/ie.sass
@@ -0,0 +1,49 @@
1
+ // The blueprint IE mixins should be mixed into a stylesheet that gets conditionally included
2
+ // into IE like so:
3
+ // <!--[if IE]><link rel="stylesheet" href="ie.css"
4
+ // type="text/css" media="screen, projection"><![endif]-->
5
+
6
+ // The +blueprint-ie mixin must be mixed into the top level of your stylesheet.
7
+ // However, you can customize the body selector if you wish to control the scope
8
+ // of this mixin. Examples:
9
+ // Apply to any page including the stylesheet:
10
+ // +blueprint-ie
11
+ // Scoped by a single presentational body class:
12
+ // +blueprint-ie("body.blueprint")
13
+ // Semantically:
14
+ // +blueprint-ie("body#page-1, body#page-2, body.a-special-page-type")
15
+ // Alternatively, you can use the +blueprint-ie-body and +blueprint-ie-defaults
16
+ // mixins to construct your own semantic style rules.
17
+
18
+ =blueprint-ie(!body_selector = "body")
19
+ #{!body_selector}
20
+ +blueprint-ie-body
21
+ @if !body_selector != "body"
22
+ +blueprint-ie-defaults
23
+ @if !body_selector == "body"
24
+ +blueprint-ie-defaults
25
+
26
+ =blueprint-ie-body
27
+ :text-align center
28
+ +blueprint-ie-hacks
29
+
30
+ =blueprint-ie-hacks
31
+ * html &
32
+ legend
33
+ :margin -18px -8px 16px 0
34
+ :padding 0
35
+ html>&
36
+ p code
37
+ :*white-space normal
38
+
39
+ =blueprint-ie-defaults
40
+ .container
41
+ :text-align left
42
+ ol
43
+ :margin-left 2em
44
+ sup
45
+ :vertical-align text-top
46
+ sub
47
+ :vertical-align text-bottom
48
+ hr
49
+ :margin -8px auto 11px
@@ -0,0 +1,82 @@
1
+ @import modules/typography.sass
2
+
3
+ // The +blueprint-print mixin must be mixed into the top level of your stylesheet.
4
+ // However, you can customize the body selector if you wish to control the scope
5
+ // of this mixin. Examples:
6
+ // Apply to any page including the stylesheet:
7
+ // +blueprint-print
8
+ // Scoped by a single presentational body class:
9
+ // +blueprint-print("body.blueprint")
10
+ // Semantically:
11
+ // +blueprint-print("body#page-1, body#page-2, body.a-special-page-type")
12
+ // Alternatively, you can use the +blueprint-print-body and +blueprint-print-defaults
13
+ // mixins to construct your own semantic style rules.
14
+
15
+ =blueprint-print(!body_selector = "body")
16
+ #{!body_selector}
17
+ +blueprint-print-body
18
+ @if !body_selector != "body"
19
+ +blueprint-print-defaults
20
+ @if !body_selector == "body"
21
+ +blueprint-print-defaults
22
+
23
+ // This style is in blueprint, but I think it's annoying and it doesn't work in all browsers.
24
+ // Feel free to mix it into anchors where you want it.
25
+ =blueprint-show-link-urls
26
+ &:after
27
+ :content " (" attr(href) ") "
28
+ :font-size 90%
29
+
30
+ =blueprint-print-body
31
+ :line-height 1.5
32
+ :font-family= !blueprint_font_family
33
+ :color #000
34
+ :background none
35
+ :font-size 10pt
36
+
37
+ =blueprint-print-defaults
38
+ .container
39
+ :background none
40
+ hr
41
+ :background #ccc
42
+ :color #ccc
43
+ :width 100%
44
+ :height 2px
45
+ :margin 2em 0
46
+ :padding 0
47
+ :border none
48
+ &.space
49
+ :background #fff
50
+ :color #fff
51
+ h1, h2, h3, h4, h5, h6
52
+ :font-family= !blueprint_font_family
53
+ code
54
+ :font
55
+ :size .9em
56
+ :family= !blueprint_fixed_font_family
57
+ img
58
+ :float left
59
+ :margin 1.5em 1.5em 1.5em 0
60
+ a
61
+ img
62
+ :border none
63
+ &:link,
64
+ &:visited
65
+ :background transparent
66
+ :font-weight 700
67
+ :text-decoration underline
68
+ p img.top
69
+ :margin-top 0
70
+ blockquote
71
+ :margin 1.5em
72
+ :padding 1em
73
+ :font-style italic
74
+ :font-size .9em
75
+ .small
76
+ :font-size .9em
77
+ .large
78
+ :font-size 1.1em
79
+ .quiet
80
+ :color #999
81
+ .hide
82
+ :display none
@@ -0,0 +1,15 @@
1
+ @import modules/colors.sass
2
+ @import modules/grid.sass
3
+ @import modules/typography.sass
4
+ @import modules/utilities.sass
5
+ @import modules/form.sass
6
+ @import modules/interaction.sass
7
+ @import modules/debug.sass
8
+
9
+ =blueprint(!body_selector = "body")
10
+ +blueprint-typography(!body_selector)
11
+ +blueprint-utilities
12
+ +blueprint-grid
13
+ +blueprint-debug
14
+ +blueprint-interaction
15
+ +blueprint-form
@@ -0,0 +1,30 @@
1
+ !font_color ||= #333
2
+ !quiet_color ||= !font_color + #333
3
+ !loud_color ||= !font_color - #222
4
+
5
+ !header_color ||= !font_color - #111
6
+
7
+ !link_color ||= #009
8
+ !link_hover_color ||= #000
9
+ !link_focus_color ||= !link_hover_color
10
+ !link_active_color ||= !link_color + #C00
11
+ !link_visited_color ||= !link_color - #333
12
+
13
+ !feedback_border_color ||= #DDD
14
+ !success_color ||= #264409
15
+ !success_bg_color ||= #E6EFC2
16
+ !success_border_color ||= #C6D880
17
+
18
+ !notice_color ||= #514721
19
+ !notice_bg_color ||= #FFF6BF
20
+ !notice_border_color ||= #FFD324
21
+
22
+ !error_color ||= #8A1F11
23
+ !error_bg_color ||= #FBE3E4
24
+ !error_border_color ||= #FBC2C4
25
+
26
+ !highlight_color ||= #FF0
27
+ !added_color ||= #FFF
28
+ !added_bg_color ||= #060
29
+ !removed_color ||= #FFF
30
+ !removed_bg_color ||= #900
@@ -0,0 +1,9 @@
1
+ =showgrid(!image = "images/grid.png")
2
+ :background= url(!image)
3
+
4
+ =blueprint-debug(!grid_image = "images/grid.png")
5
+ // Use this class on any column or container to see the grid.
6
+ // TODO: prefix this with the project path.
7
+ .showgrid
8
+ +showgrid(!grid_image)
9
+
@@ -0,0 +1,81 @@
1
+ /*
2
+ To install the fancy type plugin:
3
+ 1. import the fancy_type module:
4
+ @import blueprint/modules/fancy_type
5
+ 2. mixin +fancy-type to your project's body or at the top level of your stylesheet:
6
+ body
7
+ +fancy-type
8
+
9
+ =fancy-type
10
+ +fancy-paragraphs
11
+ .caps
12
+ +caps
13
+ .dquo
14
+ +dquo
15
+ .alt
16
+ +alt
17
+
18
+ /* Indentation instead of line shifts for sibling paragraphs. Mixin to a style like p + p
19
+ =sibling-indentation
20
+ :text-indent 2em
21
+ :margin-top -1.5em
22
+ /* Don't want this in forms.
23
+ form &
24
+ :text-indent 0
25
+
26
+ /*
27
+ For great looking type, use this code instead of asdf:
28
+ <span class="alt">asdf</span>
29
+ Best used on prepositions and ampersands.
30
+
31
+ =alt
32
+ :color #666
33
+ :font-family "Warnock Pro", "Goudy Old Style","Palatino","Book Antiqua", Georgia, serif
34
+ :font-style italic
35
+ :font-weight normal
36
+
37
+ /*
38
+ For great looking quote marks in titles, replace "asdf" with:
39
+ <span class="dquo">&#8220;</span>asdf&#8221;
40
+ (That is, when the title starts with a quote mark).
41
+ (You may have to change this value depending on your font size).
42
+ =dquo(!offset = 0.5em)
43
+ :margin-left -!offset
44
+
45
+ /*
46
+ Reduced size type with incremental leading
47
+ (http://www.markboulton.co.uk/journal/comments/incremental_leading/)
48
+
49
+ This could be used for side notes. For smaller type, you don't necessarily want to
50
+ follow the 1.5x vertical rhythm -- the line-height is too much.
51
+
52
+ Using this mixin, reduces your font size and line-height so that for
53
+ every four lines of normal sized type, there is five lines of the sidenote. eg:
54
+
55
+ Arguments:
56
+ font_size - The desired font size in pixels. This will be converted to ems for you. Defaults to 10px.
57
+ base_font_size - The base font size in pixels. Defaults to 12px
58
+ old_line_height - The old line height. Defaults to 1.5 times the base_font_size
59
+ =incr(!font_size = 10px, !base_font_size = 12px, !old_line_height = !base_font_size * 1.5)
60
+ :font-size= 1em * !font_size / !base_font_size
61
+ :line-height= 1em * !old_line_height / !font_size * 4 / 5
62
+ :margin-bottom 1.5em
63
+
64
+ /*
65
+ Surround uppercase words and abbreviations with this class.
66
+ Based on work by Jørgen Arnor Gårdsø Lom [http://twistedintellect.com/]
67
+ =caps
68
+ :font-variant small-caps
69
+ :letter-spacing 1px
70
+ :text-transform lowercase
71
+ :font-size 1.2em
72
+ :line-height 1%
73
+ :font-weight bold
74
+ :padding 0 2px
75
+
76
+ =fancy-paragraphs
77
+ p + p
78
+ +sibling-indentation
79
+ p.incr,
80
+ .incr p
81
+ +incr
@@ -0,0 +1,43 @@
1
+ @import colors.sass
2
+
3
+ =blueprint-form
4
+ label
5
+ :font-weight bold
6
+ fieldset
7
+ :padding 1.4em
8
+ :margin 0 0 1.5em 0
9
+ :border 1px solid #ccc
10
+ legend
11
+ :font-weight bold
12
+ :font-size 1.2em
13
+ input
14
+ &.text
15
+ :margin 0.5em 0
16
+ :border 1px solid #bbb
17
+ :width 300px
18
+ :padding 5px
19
+ &:focus
20
+ :border 1px solid #666
21
+ &.title
22
+ :font-size 1.5em
23
+ input.title
24
+ :margin 0.5em 0
25
+ :border 1px solid #bbb
26
+ :width 300px
27
+ :padding 5px
28
+ &:focus
29
+ :border 1px solid #666
30
+ textarea
31
+ :margin 0.5em 0
32
+ :border 1px solid #bbb
33
+ &:focus
34
+ :border 1px solid #666
35
+ select
36
+ :margin 0.5em 0
37
+ :border 1px solid #bbb
38
+ &:focus
39
+ :border 1px solid #666
40
+ textarea
41
+ :width 390px
42
+ :height 250px
43
+ :padding 5px
@@ -0,0 +1,141 @@
1
+ // --------------------------------------------------------------
2
+ // SASS Gridification
3
+ // * Author: Chris Eppstein
4
+ // A SASS adaptation of Blueprint CSS
5
+ // * Version: 0.7.1 (2008-02-25)
6
+ // * Website: http://code.google.com/p/blueprintcss/
7
+ // Based on work by:
8
+ // * Lorin Tacket [lorintackett.com]
9
+ // * Olav Bjorkoy [bjorkoy.com]
10
+ // * Nathan Borror [playgroundblues.com]
11
+ // * Jeff Croft [jeffcroft.com]
12
+ // * Christian Metts [mintchaos.com]
13
+ // * Khoi Vinh [subtraction.com]
14
+ // Read more about using a grid here:
15
+ // * subtraction.com/archives/2007/0318_oh_yeeaahh.php
16
+ // --------------------------------------------------------------
17
+
18
+ @import compass/utilities/general/clearfix.sass
19
+
20
+ // Main layout grid, override these constants to build your grid and container sizes.
21
+ !blueprint_grid_columns ||= 24
22
+ !blueprint_grid_width ||= 30px
23
+ !blueprint_grid_margin ||= 10px
24
+
25
+ !blueprint_grid_outer_width = !blueprint_grid_width + !blueprint_grid_margin
26
+ !blueprint_container_size = !blueprint_grid_outer_width * !blueprint_grid_columns - !blueprint_grid_margin
27
+
28
+
29
+ =blueprint-grid
30
+ // A container should group all your columns
31
+ .container
32
+ +container
33
+ // Use these classes (or mixins) to set the width of a column.
34
+ @for !n from 1 to !blueprint_grid_columns + 1
35
+ .span-#{!n}
36
+ +span(!n)
37
+ div
38
+ &.span-#{!n}
39
+ +column(!n, !n == !blueprint_grid_columns)
40
+ // The last column in a row needs this class (or mixin) or it will end up on the next row.
41
+ div.last
42
+ +last
43
+ // Add these to a column to append empty cols.
44
+ @for !n from 1 to !blueprint_grid_columns
45
+ .append-#{!n}
46
+ +append(!n)
47
+ // Add these to a column to prepend empty cols.
48
+ @for !n from 1 to !blueprint_grid_columns
49
+ .prepend-#{!n}
50
+ +prepend(!n)
51
+ // Use these classes on an element to push it into the
52
+ // next column, or to pull it into the previous column.
53
+ @for !n from 1 to !blueprint_grid_columns + 1
54
+ .pull-#{!n}
55
+ +pull(!n)
56
+ @for !n from 1 to !blueprint_grid_columns + 1
57
+ .push-#{!n}
58
+ +push(!n)
59
+
60
+
61
+ // Columns
62
+ // Note: If you use this mixin without the class and want to support ie6
63
+ // you must set text-align left on your container element in an IE stylesheet.
64
+ =container
65
+ :width = !blueprint_container_size
66
+ :margin 0 auto
67
+ +clearfix
68
+
69
+ // The last column in a row needs this mixin or it will end up on the next row.
70
+ // TODO add this to span mixin when we have optional arguments
71
+ =last
72
+ :margin
73
+ :right 0
74
+
75
+ =span(!n)
76
+ :width = !blueprint_grid_width * !n + (!blueprint_grid_margin * (!n - 1))
77
+
78
+ // Use this mixins to set the width of n columns.
79
+ =column(!n, !last = false)
80
+ :float left
81
+ +span(!n)
82
+ @if !last
83
+ +last
84
+ @else
85
+ :margin-right = !blueprint_grid_margin
86
+
87
+ // Mixin to a column to append n empty cols.
88
+ =append(!n)
89
+ :padding-right = (!blueprint_grid_outer_width) * !n
90
+
91
+ // Mixin to a column to prepend n empty cols.
92
+ =prepend(!n)
93
+ :padding-left = (!blueprint_grid_outer_width) * !n
94
+
95
+ // mixin to a column to move it n columns to the left
96
+ =pull(!n, !last = false)
97
+ :float left
98
+ :position relative
99
+ @if !last
100
+ :margin-left = (-!blueprint_grid_outer_width * !n) + !blueprint_grid_margin
101
+ @else
102
+ :margin-left = -!blueprint_grid_outer_width * !n
103
+
104
+ // mixin to a column to push it n columns to the right
105
+ =push(!n)
106
+ :float right
107
+ :position relative
108
+ :margin
109
+ :top 0
110
+ :right = -!blueprint_grid_outer_width * !n
111
+ :bottom 1.5em
112
+ :left = !blueprint_grid_outer_width * !n
113
+
114
+ // Border on right hand side of a column.
115
+ =border
116
+ :padding-right = !blueprint_grid_margin / 2 - 1
117
+ :margin-right = !blueprint_grid_margin / 2
118
+ :border-right 1px solid #eee
119
+
120
+ // Border with more whitespace, spans one column.
121
+ =colborder
122
+ :padding-right= !blueprint_grid_width - 0.5 * !blueprint_grid_margin - 1
123
+ :margin-right= !blueprint_grid_width - 0.5 * !blueprint_grid_margin
124
+ :border-right 1px solid #eee
125
+
126
+ // Mixin this to an hr to make a horizontal ruler across a column.
127
+ =colruler
128
+ :background #ddd
129
+ :color #ddd
130
+ :clear both
131
+ :float none
132
+ :width 100%
133
+ :height .1em
134
+ :margin 0 0 1.45em
135
+ :border none
136
+
137
+ // Mixin this to an hr to make a horizontal spacer across a column.
138
+ =colspacer
139
+ +colruler
140
+ :background #fff
141
+ :color #fff