compass 0.11.alpha.4 → 0.11.beta.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.
Files changed (309) hide show
  1. data/Rakefile +1 -1
  2. data/VERSION.yml +2 -2
  3. data/examples/blueprint_plugins/src/link_icons.scss +1 -1
  4. data/examples/blueprint_semantic/src/liquid.scss +3 -3
  5. data/examples/blueprint_semantic/src/screen.scss +4 -4
  6. data/examples/compass/config.rb +1 -0
  7. data/examples/compass/images/emblem-a043c4f148.png +0 -0
  8. data/examples/compass/images/emblem/favorite.png +0 -0
  9. data/examples/compass/images/emblem/important.png +0 -0
  10. data/examples/compass/images/emblem/photos.png +0 -0
  11. data/examples/compass/images/emblem/readonly.png +0 -0
  12. data/examples/compass/images/emblem/symbolic-link.png +0 -0
  13. data/examples/compass/images/emblem/system.png +0 -0
  14. data/examples/compass/images/emblem/unreadable.png +0 -0
  15. data/examples/compass/images/flag-03c3b29b35.png +0 -0
  16. data/examples/compass/images/flag-21cfbfbfc8.png +0 -0
  17. data/examples/compass/images/flag/ad.png +0 -0
  18. data/examples/compass/images/flag/ae.png +0 -0
  19. data/examples/compass/images/flag/af.png +0 -0
  20. data/examples/compass/images/flag/ag.png +0 -0
  21. data/examples/compass/images/flag/ai.png +0 -0
  22. data/examples/compass/images/flag/al.png +0 -0
  23. data/examples/compass/images/flag/am.png +0 -0
  24. data/examples/compass/images/flag/an.png +0 -0
  25. data/examples/compass/images/flag/ao.png +0 -0
  26. data/examples/compass/images/flag/ar.png +0 -0
  27. data/examples/compass/images/flag/as.png +0 -0
  28. data/examples/compass/images/flag/at.png +0 -0
  29. data/examples/compass/images/flag/au.png +0 -0
  30. data/examples/compass/images/flag/aw.png +0 -0
  31. data/examples/compass/images/flag/ax.png +0 -0
  32. data/examples/compass/images/flag/az.png +0 -0
  33. data/examples/compass/images/flag/ba.png +0 -0
  34. data/examples/compass/images/flag/bb.png +0 -0
  35. data/examples/compass/images/flag/bd.png +0 -0
  36. data/examples/compass/images/flag/be.png +0 -0
  37. data/examples/compass/images/flag/bf.png +0 -0
  38. data/examples/compass/images/flag/bg.png +0 -0
  39. data/examples/compass/images/flag/bh.png +0 -0
  40. data/examples/compass/images/flag/bi.png +0 -0
  41. data/examples/compass/images/flag/bj.png +0 -0
  42. data/examples/compass/images/flag/bm.png +0 -0
  43. data/examples/compass/images/flag/bn.png +0 -0
  44. data/examples/compass/images/flag/bo.png +0 -0
  45. data/examples/compass/images/flag/br.png +0 -0
  46. data/examples/compass/images/flag/bs.png +0 -0
  47. data/examples/compass/images/flag/bt.png +0 -0
  48. data/examples/compass/images/flag/bv.png +0 -0
  49. data/examples/compass/images/flag/bw.png +0 -0
  50. data/examples/compass/images/flag/by.png +0 -0
  51. data/examples/compass/images/flag/bz.png +0 -0
  52. data/examples/compass/images/flag/ca.png +0 -0
  53. data/examples/compass/images/flag/catalonia.png +0 -0
  54. data/examples/compass/images/flag/cc.png +0 -0
  55. data/examples/compass/images/flag/cd.png +0 -0
  56. data/examples/compass/images/flag/cf.png +0 -0
  57. data/examples/compass/images/flag/cg.png +0 -0
  58. data/examples/compass/images/flag/ch.png +0 -0
  59. data/examples/compass/images/flag/ci.png +0 -0
  60. data/examples/compass/images/flag/ck.png +0 -0
  61. data/examples/compass/images/flag/cl.png +0 -0
  62. data/examples/compass/images/flag/cm.png +0 -0
  63. data/examples/compass/images/flag/cn.png +0 -0
  64. data/examples/compass/images/flag/co.png +0 -0
  65. data/examples/compass/images/flag/cr.png +0 -0
  66. data/examples/compass/images/flag/cs.png +0 -0
  67. data/examples/compass/images/flag/cu.png +0 -0
  68. data/examples/compass/images/flag/cv.png +0 -0
  69. data/examples/compass/images/flag/cx.png +0 -0
  70. data/examples/compass/images/flag/cy.png +0 -0
  71. data/examples/compass/images/flag/cz.png +0 -0
  72. data/examples/compass/images/flag/de.png +0 -0
  73. data/examples/compass/images/flag/dj.png +0 -0
  74. data/examples/compass/images/flag/dk.png +0 -0
  75. data/examples/compass/images/flag/dm.png +0 -0
  76. data/examples/compass/images/flag/do.png +0 -0
  77. data/examples/compass/images/flag/dz.png +0 -0
  78. data/examples/compass/images/flag/ec.png +0 -0
  79. data/examples/compass/images/flag/ee.png +0 -0
  80. data/examples/compass/images/flag/eg.png +0 -0
  81. data/examples/compass/images/flag/eh.png +0 -0
  82. data/examples/compass/images/flag/england.png +0 -0
  83. data/examples/compass/images/flag/er.png +0 -0
  84. data/examples/compass/images/flag/es.png +0 -0
  85. data/examples/compass/images/flag/et.png +0 -0
  86. data/examples/compass/images/flag/europeanunion.png +0 -0
  87. data/examples/compass/images/flag/fam.png +0 -0
  88. data/examples/compass/images/flag/fi.png +0 -0
  89. data/examples/compass/images/flag/fj.png +0 -0
  90. data/examples/compass/images/flag/fk.png +0 -0
  91. data/examples/compass/images/flag/fm.png +0 -0
  92. data/examples/compass/images/flag/fo.png +0 -0
  93. data/examples/compass/images/flag/fr.png +0 -0
  94. data/examples/compass/images/flag/ga.png +0 -0
  95. data/examples/compass/images/flag/gb.png +0 -0
  96. data/examples/compass/images/flag/gd.png +0 -0
  97. data/examples/compass/images/flag/ge.png +0 -0
  98. data/examples/compass/images/flag/gf.png +0 -0
  99. data/examples/compass/images/flag/gh.png +0 -0
  100. data/examples/compass/images/flag/gi.png +0 -0
  101. data/examples/compass/images/flag/gl.png +0 -0
  102. data/examples/compass/images/flag/gm.png +0 -0
  103. data/examples/compass/images/flag/gn.png +0 -0
  104. data/examples/compass/images/flag/gp.png +0 -0
  105. data/examples/compass/images/flag/gq.png +0 -0
  106. data/examples/compass/images/flag/gr.png +0 -0
  107. data/examples/compass/images/flag/gs.png +0 -0
  108. data/examples/compass/images/flag/gt.png +0 -0
  109. data/examples/compass/images/flag/gu.png +0 -0
  110. data/examples/compass/images/flag/gw.png +0 -0
  111. data/examples/compass/images/flag/gy.png +0 -0
  112. data/examples/compass/images/flag/hk.png +0 -0
  113. data/examples/compass/images/flag/hm.png +0 -0
  114. data/examples/compass/images/flag/hn.png +0 -0
  115. data/examples/compass/images/flag/hr.png +0 -0
  116. data/examples/compass/images/flag/ht.png +0 -0
  117. data/examples/compass/images/flag/hu.png +0 -0
  118. data/examples/compass/images/flag/id-2.png +0 -0
  119. data/examples/compass/images/flag/ie.png +0 -0
  120. data/examples/compass/images/flag/il.png +0 -0
  121. data/examples/compass/images/flag/in.png +0 -0
  122. data/examples/compass/images/flag/io.png +0 -0
  123. data/examples/compass/images/flag/iq.png +0 -0
  124. data/examples/compass/images/flag/ir.png +0 -0
  125. data/examples/compass/images/flag/is.png +0 -0
  126. data/examples/compass/images/flag/it.png +0 -0
  127. data/examples/compass/images/flag/jm.png +0 -0
  128. data/examples/compass/images/flag/jo.png +0 -0
  129. data/examples/compass/images/flag/jp.png +0 -0
  130. data/examples/compass/images/flag/ke.png +0 -0
  131. data/examples/compass/images/flag/kg.png +0 -0
  132. data/examples/compass/images/flag/kh.png +0 -0
  133. data/examples/compass/images/flag/ki.png +0 -0
  134. data/examples/compass/images/flag/km.png +0 -0
  135. data/examples/compass/images/flag/kn.png +0 -0
  136. data/examples/compass/images/flag/kp.png +0 -0
  137. data/examples/compass/images/flag/kr.png +0 -0
  138. data/examples/compass/images/flag/kw.png +0 -0
  139. data/examples/compass/images/flag/ky.png +0 -0
  140. data/examples/compass/images/flag/kz.png +0 -0
  141. data/examples/compass/images/flag/la.png +0 -0
  142. data/examples/compass/images/flag/lb.png +0 -0
  143. data/examples/compass/images/flag/lc.png +0 -0
  144. data/examples/compass/images/flag/li.png +0 -0
  145. data/examples/compass/images/flag/lk.png +0 -0
  146. data/examples/compass/images/flag/lr.png +0 -0
  147. data/examples/compass/images/flag/ls.png +0 -0
  148. data/examples/compass/images/flag/lt.png +0 -0
  149. data/examples/compass/images/flag/lu.png +0 -0
  150. data/examples/compass/images/flag/lv.png +0 -0
  151. data/examples/compass/images/flag/ly.png +0 -0
  152. data/examples/compass/images/flag/ma.png +0 -0
  153. data/examples/compass/images/flag/mc.png +0 -0
  154. data/examples/compass/images/flag/md.png +0 -0
  155. data/examples/compass/images/flag/me.png +0 -0
  156. data/examples/compass/images/flag/mg.png +0 -0
  157. data/examples/compass/images/flag/mh.png +0 -0
  158. data/examples/compass/images/flag/mk.png +0 -0
  159. data/examples/compass/images/flag/ml.png +0 -0
  160. data/examples/compass/images/flag/mm.png +0 -0
  161. data/examples/compass/images/flag/mn.png +0 -0
  162. data/examples/compass/images/flag/mo.png +0 -0
  163. data/examples/compass/images/flag/mp.png +0 -0
  164. data/examples/compass/images/flag/mq.png +0 -0
  165. data/examples/compass/images/flag/mr.png +0 -0
  166. data/examples/compass/images/flag/ms.png +0 -0
  167. data/examples/compass/images/flag/mt.png +0 -0
  168. data/examples/compass/images/flag/mu.png +0 -0
  169. data/examples/compass/images/flag/mv.png +0 -0
  170. data/examples/compass/images/flag/mw.png +0 -0
  171. data/examples/compass/images/flag/mx.png +0 -0
  172. data/examples/compass/images/flag/my.png +0 -0
  173. data/examples/compass/images/flag/mz.png +0 -0
  174. data/examples/compass/images/flag/na.png +0 -0
  175. data/examples/compass/images/flag/nc.png +0 -0
  176. data/examples/compass/images/flag/ne.png +0 -0
  177. data/examples/compass/images/flag/nf.png +0 -0
  178. data/examples/compass/images/flag/ng.png +0 -0
  179. data/examples/compass/images/flag/ni.png +0 -0
  180. data/examples/compass/images/flag/nl.png +0 -0
  181. data/examples/compass/images/flag/no.png +0 -0
  182. data/examples/compass/images/flag/np.png +0 -0
  183. data/examples/compass/images/flag/nr.png +0 -0
  184. data/examples/compass/images/flag/nu.png +0 -0
  185. data/examples/compass/images/flag/nz.png +0 -0
  186. data/examples/compass/images/flag/om.png +0 -0
  187. data/examples/compass/images/flag/pa.png +0 -0
  188. data/examples/compass/images/flag/pe.png +0 -0
  189. data/examples/compass/images/flag/pf.png +0 -0
  190. data/examples/compass/images/flag/pg.png +0 -0
  191. data/examples/compass/images/flag/ph.png +0 -0
  192. data/examples/compass/images/flag/pk.png +0 -0
  193. data/examples/compass/images/flag/pl.png +0 -0
  194. data/examples/compass/images/flag/pm.png +0 -0
  195. data/examples/compass/images/flag/pn.png +0 -0
  196. data/examples/compass/images/flag/pr.png +0 -0
  197. data/examples/compass/images/flag/ps.png +0 -0
  198. data/examples/compass/images/flag/pt.png +0 -0
  199. data/examples/compass/images/flag/pw.png +0 -0
  200. data/examples/compass/images/flag/py.png +0 -0
  201. data/examples/compass/images/flag/qa.png +0 -0
  202. data/examples/compass/images/flag/re.png +0 -0
  203. data/examples/compass/images/flag/ro.png +0 -0
  204. data/examples/compass/images/flag/rs.png +0 -0
  205. data/examples/compass/images/flag/ru.png +0 -0
  206. data/examples/compass/images/flag/rw.png +0 -0
  207. data/examples/compass/images/flag/sa.png +0 -0
  208. data/examples/compass/images/flag/sb.png +0 -0
  209. data/examples/compass/images/flag/sc.png +0 -0
  210. data/examples/compass/images/flag/scotland.png +0 -0
  211. data/examples/compass/images/flag/sd.png +0 -0
  212. data/examples/compass/images/flag/se.png +0 -0
  213. data/examples/compass/images/flag/sg.png +0 -0
  214. data/examples/compass/images/flag/sh.png +0 -0
  215. data/examples/compass/images/flag/si.png +0 -0
  216. data/examples/compass/images/flag/sj.png +0 -0
  217. data/examples/compass/images/flag/sk.png +0 -0
  218. data/examples/compass/images/flag/sl.png +0 -0
  219. data/examples/compass/images/flag/sm.png +0 -0
  220. data/examples/compass/images/flag/sn.png +0 -0
  221. data/examples/compass/images/flag/so.png +0 -0
  222. data/examples/compass/images/flag/sr.png +0 -0
  223. data/examples/compass/images/flag/st.png +0 -0
  224. data/examples/compass/images/flag/sv.png +0 -0
  225. data/examples/compass/images/flag/sy.png +0 -0
  226. data/examples/compass/images/flag/sz.png +0 -0
  227. data/examples/compass/images/flag/tc.png +0 -0
  228. data/examples/compass/images/flag/td.png +0 -0
  229. data/examples/compass/images/flag/tf.png +0 -0
  230. data/examples/compass/images/flag/tg.png +0 -0
  231. data/examples/compass/images/flag/th.png +0 -0
  232. data/examples/compass/images/flag/tj.png +0 -0
  233. data/examples/compass/images/flag/tk.png +0 -0
  234. data/examples/compass/images/flag/tl.png +0 -0
  235. data/examples/compass/images/flag/tm.png +0 -0
  236. data/examples/compass/images/flag/tn.png +0 -0
  237. data/examples/compass/images/flag/to.png +0 -0
  238. data/examples/compass/images/flag/tr.png +0 -0
  239. data/examples/compass/images/flag/tt.png +0 -0
  240. data/examples/compass/images/flag/tv.png +0 -0
  241. data/examples/compass/images/flag/tw.png +0 -0
  242. data/examples/compass/images/flag/tz.png +0 -0
  243. data/examples/compass/images/flag/ua.png +0 -0
  244. data/examples/compass/images/flag/ug.png +0 -0
  245. data/examples/compass/images/flag/um.png +0 -0
  246. data/examples/compass/images/flag/us.png +0 -0
  247. data/examples/compass/images/flag/uy.png +0 -0
  248. data/examples/compass/images/flag/uz.png +0 -0
  249. data/examples/compass/images/flag/va.png +0 -0
  250. data/examples/compass/images/flag/vc.png +0 -0
  251. data/examples/compass/images/flag/ve.png +0 -0
  252. data/examples/compass/images/flag/vg.png +0 -0
  253. data/examples/compass/images/flag/vi.png +0 -0
  254. data/examples/compass/images/flag/vn.png +0 -0
  255. data/examples/compass/images/flag/vu.png +0 -0
  256. data/examples/compass/images/flag/wales.png +0 -0
  257. data/examples/compass/images/flag/wf.png +0 -0
  258. data/examples/compass/images/flag/ws.png +0 -0
  259. data/examples/compass/images/flag/ye.png +0 -0
  260. data/examples/compass/images/flag/yt.png +0 -0
  261. data/examples/compass/images/flag/za.png +0 -0
  262. data/examples/compass/images/flag/zm.png +0 -0
  263. data/examples/compass/images/flag/zw.png +0 -0
  264. data/examples/compass/sprites.html.haml +37 -0
  265. data/examples/compass/src/sprites.scss +25 -0
  266. data/examples/compass/src/sticky_footer.scss +1 -1
  267. data/examples/compass/src/utilities.scss +1 -1
  268. data/examples/css3/src/gradients.scss +30 -30
  269. data/examples/css3/src/main.scss +13 -19
  270. data/features/rails_integration.feature +32 -0
  271. data/frameworks/blueprint/stylesheets/blueprint/_grid.scss +16 -9
  272. data/frameworks/blueprint/stylesheets/blueprint/_liquid.scss +11 -6
  273. data/frameworks/compass/stylesheets/compass/_support.scss +8 -5
  274. data/frameworks/compass/stylesheets/compass/css3/_images.scss +6 -2
  275. data/frameworks/compass/stylesheets/compass/css3/_opacity.scss +6 -11
  276. data/frameworks/compass/stylesheets/compass/css3/_transform.scss +20 -6
  277. data/frameworks/compass/stylesheets/compass/utilities/sprites/_base.scss +3 -2
  278. data/lib/compass.rb +1 -1
  279. data/lib/compass/app_integration/rails.rb +3 -3
  280. data/lib/compass/app_integration/rails/actionpack2/urls.rb +2 -2
  281. data/lib/compass/app_integration/rails/actionpack3/railtie.rb +39 -11
  282. data/lib/compass/app_integration/rails/configuration_defaults.rb +14 -8
  283. data/lib/compass/browser_support.rb +62 -0
  284. data/lib/compass/commands/print_version.rb +10 -7
  285. data/lib/compass/commands/project_base.rb +1 -1
  286. data/lib/compass/commands/watch_project.rb +17 -0
  287. data/lib/compass/configuration/data.rb +15 -0
  288. data/lib/compass/configuration/helpers.rb +7 -8
  289. data/lib/compass/configuration/inheritance.rb +14 -0
  290. data/lib/compass/configuration/serialization.rb +8 -4
  291. data/lib/compass/sass_extensions/functions.rb +2 -1
  292. data/lib/compass/sass_extensions/functions/colors.rb +2 -3
  293. data/lib/compass/sass_extensions/functions/cross_browser_support.rb +39 -0
  294. data/lib/compass/sass_extensions/functions/gradient_support.rb +87 -379
  295. data/lib/compass/sass_extensions/functions/lists.rb +84 -0
  296. data/lib/compass/sass_extensions/functions/sprites.rb +4 -2
  297. data/lib/compass/sass_extensions/monkey_patches.rb +1 -1
  298. data/lib/compass/sass_extensions/monkey_patches/browser_support.rb +89 -0
  299. data/lib/compass/sprites.rb +4 -4
  300. data/test/fixtures/stylesheets/blueprint/css/screen.css +24 -24
  301. data/test/fixtures/stylesheets/blueprint/css/single-imports/grid.css +24 -24
  302. data/test/fixtures/stylesheets/blueprint/css/single-imports/rtl.css +24 -24
  303. data/test/fixtures/stylesheets/compass/css/gradients.css +21 -6
  304. data/test/fixtures/stylesheets/compass/css/opacity.css +4 -0
  305. data/test/fixtures/stylesheets/compass/css/pie.css +0 -1
  306. data/test/fixtures/stylesheets/compass/sass/gradients.sass +9 -0
  307. data/test/fixtures/stylesheets/compass/sass/opacity.scss +5 -0
  308. data/test/rails_integration_test.rb +3 -3
  309. metadata +272 -4
@@ -54,15 +54,15 @@ $blueprint-container-size: $blueprint-grid-outer-width * $blueprint-grid-columns
54
54
  @for $n from 1 to $blueprint-grid-columns {
55
55
  .span-#{$n} {
56
56
  @extend .column;
57
- @include span($n); } }
57
+ width: span($n); } }
58
58
  .span-#{$blueprint-grid-columns} {
59
59
  @extend .column;
60
- @include span($blueprint-grid-columns);
60
+ width: span($blueprint-grid-columns);
61
61
  margin: 0; }
62
62
  input, textarea, select {
63
63
  @for $n from 1 through $blueprint-grid-columns {
64
64
  &.span-#{$n} {
65
- @include span($n, true); } } }
65
+ width: span($n); } } }
66
66
  // Add these to a column to append empty cols.
67
67
  @for $n from 1 to $blueprint-grid-columns {
68
68
  .append-#{$n} {
@@ -106,18 +106,25 @@ $blueprint-container-size: $blueprint-grid-outer-width * $blueprint-grid-columns
106
106
  // Use this mixins to set the width of n columns.
107
107
  @mixin column($n, $last: false) {
108
108
  @include column-base($last);
109
- @include span($n); }
109
+ width: span($n); }
110
+
111
+ // Return the width in pixels of `$n` columns.
112
+ @function span($n) {
113
+ @return $blueprint-grid-width * $n + $blueprint-grid-margin * ($n - 1);
114
+ }
110
115
 
111
116
  // Set only the width of an element to align it with the grid.
112
117
  // Most of the time you'll want to use `+column` instead.
113
118
  //
114
119
  // This mixin is especially useful for aligning tables to the grid.
115
- @mixin span($n, $override: false) {
116
- $width: $blueprint-grid-width * $n + $blueprint-grid-margin * ($n - 1);
117
- @if $override {
118
- width: $width !important; }
120
+ //
121
+ // @deprecated Please use the span function with the width property instead.
122
+ @mixin span($n, $important: false) {
123
+ @warn "The span mixin is deprecated. Please use the span function instead. E.g. width: span(#{$n})";
124
+ @if $important {
125
+ width: span($n) !important; }
119
126
  @else {
120
- width: $width; } }
127
+ width: span($n); } }
121
128
 
122
129
  // The basic set of styles needed to make an element
123
130
  // behave like a column:
@@ -55,8 +55,7 @@ $blueprint-liquid-grid-push-pull: -($blueprint-liquid-grid-margin + $blueprint-l
55
55
  @include container; }
56
56
  // Use these classes (or mixins) to set the width of a column.
57
57
  @for $n from 1 to $blueprint-liquid-grid-columns + 1 {
58
- .span-#{$n} {
59
- @include span($n); }
58
+ .span-#{$n} { width: span-fluid($n); }
60
59
  div {
61
60
  &.span-#{$n} {
62
61
  @include column($n, $n == $blueprint-liquid-grid-columns); } } }
@@ -86,9 +85,15 @@ $blueprint-liquid-grid-push-pull: -($blueprint-liquid-grid-margin + $blueprint-l
86
85
  margin: 0 auto;
87
86
  @include clearfix; }
88
87
 
89
- @mixin span($n, $override: false) {
90
- $width: $blueprint-liquid-grid-width * $n + $blueprint-liquid-grid-margin * ($n - 1);
91
- @if $override {
88
+ // Return the width of `$n` columns in percents.
89
+ @function span-fluid($n) {
90
+ @return $blueprint-liquid-grid-width * $n + $blueprint-liquid-grid-margin * ($n - 1);
91
+ }
92
+
93
+ @mixin span($n, $important: false) {
94
+ @warn "The span mixin is deprecated. Please use the span-fluid function instead. E.g. width: span-fluid(#{$n})";
95
+ $width: span-fluid($n);
96
+ @if $important {
92
97
  width: $width !important; }
93
98
  @else {
94
99
  width: $width; } }
@@ -99,7 +104,7 @@ $blueprint-liquid-grid-push-pull: -($blueprint-liquid-grid-margin + $blueprint-l
99
104
  @mixin column($n, $last: false) {
100
105
  @include float-left;
101
106
  overflow: hidden;
102
- @include span($n);
107
+ width: span-fluid($n);
103
108
  @if $last {
104
109
  @include last; }
105
110
  @else {
@@ -1,17 +1,20 @@
1
1
  // Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
2
2
  $legacy-support-for-ie: true !default;
3
3
 
4
- // Setting this to false will result in smaller output, but no support for ie6
4
+ // Setting this to false will result in smaller output, but no support for ie6 hacks
5
5
  $legacy-support-for-ie6: $legacy-support-for-ie !default;
6
6
 
7
- // Setting this to false will result in smaller output, but no support for ie7
7
+ // Setting this to false will result in smaller output, but no support for ie7 hacks
8
8
  $legacy-support-for-ie7: $legacy-support-for-ie !default;
9
9
 
10
+ // Setting this to false will result in smaller output, but no support for legacy ie8 hacks
11
+ $legacy-support-for-ie8: $legacy-support-for-ie !default;
12
+
10
13
  // @private
11
- // The user can simply set $legacy-support-for-ie and 6 & 7 will be set accordingly,
12
- // But in case the user set either of those explicitly, we need to sync the value of
14
+ // The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
15
+ // But in case the user set each of those explicitly, we need to sync the value of
13
16
  // this combined variable.
14
- $legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7;
17
+ $legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;
15
18
 
16
19
  // Support for mozilla in experimental css3 properties.
17
20
  $experimental-support-for-mozilla : true !default;
@@ -54,8 +54,12 @@
54
54
  @mixin filter-gradient($start-color, $end-color, $orientation: vertical) {
55
55
  @include has-layout;
56
56
  $gradient-type: if($orientation == vertical, 0, 1);
57
- filter: progid:DXImageTransform.Microsoft.gradient(gradientType=#{$gradient-type}, startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}');
58
- -ms-filter: "progid:DXImageTransform.Microsoft.gradient(gradientType=#{$gradient-type}, startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}')";
57
+ @if $legacy-support-for-ie8 {
58
+ -ms-filter: "progid:DXImageTransform.Microsoft.gradient(gradientType=#{$gradient-type}, startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}')";
59
+ }
60
+ @if $legacy-support-for-ie6 or $legacy-support-for-ie7 {
61
+ filter: progid:DXImageTransform.Microsoft.gradient(gradientType=#{$gradient-type}, startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}');
62
+ }
59
63
  }
60
64
 
61
65
 
@@ -6,18 +6,13 @@
6
6
  // A number between 0 and 1, where 0 is transparent and 1 is opaque.
7
7
 
8
8
  @mixin opacity($opacity) {
9
- opacity: $opacity;
10
- @if $experimental-support-for-microsoft {
11
- $value: unquote("progid:DXImageTransform.Microsoft.Alpha(Opacity=#{round($opacity * 100)})");
12
- @include experimental(filter, $value,
13
- not -moz,
14
- not -webkit,
15
- not -o,
16
- -ms,
17
- not -khtml,
18
- official // even though filter is not an official css3 property, IE 6/7 expect it.
19
- );
9
+ @if $legacy-support-for-ie8 {
10
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=#{round($opacity * 100)})";
11
+ }
12
+ @if $legacy-support-for-ie6 or $legacy-support-for-ie7 {
13
+ filter: unquote("progid:DXImageTransform.Microsoft.Alpha(Opacity=#{round($opacity * 100)})");
20
14
  }
15
+ opacity: $opacity;
21
16
  }
22
17
 
23
18
  // Make an element completely transparent.
@@ -47,31 +47,45 @@
47
47
  // Defaults ------------------------------------------------------------------
48
48
  // @doc on
49
49
 
50
- // Transform Origin
50
+ // The default x-origin for transforms
51
51
  $default-origin-x : 50% !default;
52
+ // The default y-origin for transforms
52
53
  $default-origin-y : 50% !default;
54
+ // The default z-origin for transforms
53
55
  $default-origin-z : 50% !default;
54
56
 
55
- // Scale
57
+
58
+ // The default x-multiplier for scaling
56
59
  $default-scale-x : 1.25 !default;
60
+ // The default y-multiplier for scaling
57
61
  $default-scale-y : $default-scale-x !default;
62
+ // The default z-multiplier for scaling
58
63
  $default-scale-z : $default-scale-x !default;
59
64
 
60
- // Rotate
65
+
66
+ // The default angle for rotations
61
67
  $default-rotate : 45deg !default;
62
68
 
63
- // Rotate3d
69
+
70
+ // The default x-vector for the axis of 3d rotations
64
71
  $default-vector-x : 1 !default;
72
+ // The default y-vector for the axis of 3d rotations
65
73
  $default-vector-y : 1 !default;
74
+ // The default z-vector for the axis of 3d rotations
66
75
  $default-vector-z : 1 !default;
67
76
 
68
- // Translate
77
+
78
+ // The default x-length for translations
69
79
  $default-translate-x : 1em !default;
80
+ // The default y-length for translations
70
81
  $default-translate-y : $default-translate-x !default;
82
+ // The default z-length for translations
71
83
  $default-translate-z : $default-translate-x !default;
72
84
 
73
- // Skew
85
+
86
+ // The default x-angle for skewing
74
87
  $default-skew-x : 5deg !default;
88
+ // The default y-angle for skewing
75
89
  $default-skew-y : 5deg !default;
76
90
 
77
91
 
@@ -30,9 +30,10 @@
30
30
  // If a base class is provided, then each class will extend it.
31
31
  //
32
32
  // If `$dimensions` is `true`, the sprite dimensions will specified.
33
- @mixin sprites($map, $sprite-names, $base-class: false, $dimensions: false) {
33
+ @mixin sprites($map, $sprite-names, $base-class: false, $dimensions: false, $prefix: sprite-map-name($map)) {
34
34
  @each $sprite-name in $sprite-names {
35
- .#{sprite-map-name($map)}-#{$sprite-name} {
35
+ $full-sprite-name: if($prefix and $prefix != "", "#{$prefix}-#{$sprite-name}", $sprite-name);
36
+ .#{$full-sprite-name} {
36
37
  @if $base-class { @extend #{$base-class}; }
37
38
  @include sprite($map, $sprite-name, $dimensions);
38
39
  }
@@ -1,7 +1,7 @@
1
1
  module Compass
2
2
  end
3
3
 
4
- %w(dependencies util sass_extensions core_ext version errors quick_cache).each do |lib|
4
+ %w(dependencies util browser_support sass_extensions core_ext version errors quick_cache).each do |lib|
5
5
  require "compass/#{lib}"
6
6
  end
7
7
 
@@ -34,9 +34,9 @@ module Compass
34
34
  end
35
35
  end
36
36
 
37
- def initialize!
38
- config_file = Compass.detect_configuration_file(root)
39
- Compass.add_project_configuration(config_file)
37
+ def initialize!(config = nil)
38
+ config ||= Compass.detect_configuration_file(root)
39
+ Compass.add_project_configuration(config, :project_type => :rails)
40
40
  Compass.discover_extensions!
41
41
  Compass.configure_sass_plugin!
42
42
  Compass.handle_configuration_change!
@@ -1,5 +1,5 @@
1
1
  module Compass::SassExtensions::Functions::Urls
2
- def image_url_with_rails_integration(path, only_path = Sass::Script::Bool.new(false))
2
+ def image_url_with_rails_integration(path, only_path = Sass::Script::Bool.new(false), cache_buster = Sass::Script::Bool.new(true))
3
3
  if (@controller = Sass::Plugin.rails_controller) && @controller.respond_to?(:request) && @controller.request
4
4
  begin
5
5
  if only_path.to_bool
@@ -11,7 +11,7 @@ module Compass::SassExtensions::Functions::Urls
11
11
  @controller = nil
12
12
  end
13
13
  else
14
- image_url_without_rails_integration(path)
14
+ image_url_without_rails_integration(path, only_path, cache_buster)
15
15
  end
16
16
  end
17
17
  alias_method_chain :image_url, :rails_integration
@@ -1,18 +1,46 @@
1
1
  require 'compass'
2
2
  require 'rails'
3
- module Compass
4
- class Railtie < Rails::Railtie
5
- config.to_prepare do
6
- # putting this here allows compass to detect
7
- # and adjust to changes to the project configuration
8
- Compass.reset_configuration!
9
- Compass::AppIntegration::Rails.initialize!
3
+
4
+ class Rails::Railtie::Configuration
5
+ # Adds compass configuration accessor to the application configuration.
6
+ #
7
+ # If a configuration file for compass exists, it will be read in and
8
+ # the project's configuration values will already be set on the config
9
+ # object.
10
+ #
11
+ # For example:
12
+ #
13
+ # module MyApp
14
+ # class Application < Rails::Application
15
+ # config.compass.line_comments = !Rails.env.production?
16
+ # config.compass.fonts_dir = "app/assets/fonts"
17
+ # end
18
+ # end
19
+ #
20
+ # It is suggested that you create a compass configuration file if you
21
+ # want a quicker boot time when using the compass command line tool.
22
+ #
23
+ # For more information on available configuration options see:
24
+ # http://compass-style.org/help/tutorials/configuration-reference/
25
+ def compass
26
+ @compass ||= begin
27
+ data = if (config_file = Compass.detect_configuration_file) && (config_data = Compass.configuration_for(config_file))
28
+ config_data
29
+ else
30
+ Compass::Configuration::Data.new("project")
31
+ end
32
+ data.project_type = :rails # Forcing this makes sure all the rails defaults will be loaded.
33
+ data
10
34
  end
35
+ end
36
+ end
11
37
 
12
- initializer "compass/railtie.configure_rails_initialization" do |app|
13
- # XXX How do I only do this if it's not done yet?
14
- # require 'sass/plugin/rack'
15
- # app.middleware.use Sass::Plugin::Rack
38
+ module Compass
39
+ class Railtie < Rails::Railtie
40
+ initializer "compass.initialize_rails" do |app|
41
+ # Configure compass for use within rails, and provide the project configuration
42
+ # that came via the rails boot process.
43
+ Compass::AppIntegration::Rails.initialize!(app.config.compass)
16
44
  end
17
45
  end
18
46
  end
@@ -8,9 +8,11 @@ module Compass
8
8
  end
9
9
 
10
10
  def default_sass_dir
11
- # XXX Maybe this should be: app/views/stylesheets
12
- # or maybe layouts should be moved up a level.
13
- File.join("app", "stylesheets")
11
+ if Sass::Util.ap_geq?('3.1.0.beta')
12
+ File.join("app", "assets", "stylesheets")
13
+ else
14
+ File.join("app", "stylesheets")
15
+ end
14
16
  end
15
17
 
16
18
  def default_css_dir
@@ -26,23 +28,27 @@ module Compass
26
28
  end
27
29
 
28
30
  def default_javascripts_dir
29
- File.join("public", "javascripts")
31
+ if Sass::Util.ap_geq?('3.1.0.beta')
32
+ File.join("app", "assets", "javascripts")
33
+ else
34
+ File.join("public", "javascripts")
35
+ end
30
36
  end
31
37
 
32
38
  def default_http_images_path
33
- "/images"
39
+ "#{top_level.http_path}images"
34
40
  end
35
41
 
36
42
  def default_http_javascripts_path
37
- "/javascripts"
43
+ "#{top_level.http_path}javascripts"
38
44
  end
39
45
 
40
46
  def default_http_fonts_path
41
- "/fonts"
47
+ "#{top_level.http_path}fonts"
42
48
  end
43
49
 
44
50
  def default_http_stylesheets_path
45
- "/stylesheets"
51
+ "#{top_level.http_path}stylesheets"
46
52
  end
47
53
 
48
54
  def default_extensions_dir
@@ -0,0 +1,62 @@
1
+ module Compass
2
+ module BrowserSupport
3
+ extend self
4
+
5
+ ASPECTS = %w(webkit moz o ms svg pie css2)
6
+
7
+ SIMPLE_FUNCTIONS = {
8
+ "image" => %w(), # No browsers implement this yet.
9
+ "cross-fade" => %w() # No browsers implement this yet.
10
+ }
11
+
12
+ # Adds support for one or more aspects for the given simple function
13
+ # Example:
14
+ #
15
+ # Compass::BrowserSupport.add_support("image", "moz", "webkit")
16
+ # # => Adds support for moz and webkit to the image() function.
17
+ #
18
+ # This function can be called one or more times in a compass configuration
19
+ # file in order to add support for new, simple browser functions without
20
+ # waiting for a new compass release.
21
+ def add_support(function, *aspects)
22
+ aspects.each do |aspect|
23
+ unless ASPECTS.include?(aspect)
24
+ Compass::Util.compass_warn "Unknown support aspect: #{aspect}"
25
+ next
26
+ end
27
+ unless supports?(function, aspect)
28
+ SIMPLE_FUNCTIONS[function.to_s] ||= []
29
+ SIMPLE_FUNCTIONS[function.to_s] << aspect.to_s
30
+ end
31
+ end
32
+ end
33
+
34
+ # Removes support for one or more aspects for the given simple function
35
+ # Example:
36
+ #
37
+ # Compass::BrowserSupport.remove_support("image", "o", "ms")
38
+ # # => Adds support for moz and webkit to the image() function.
39
+ #
40
+ # This function can be called one or more times in a compass configuration
41
+ # file in order to remove support for simple functions that no longer need to
42
+ # a prefix without waiting for a new compass release.
43
+ def remove_support(function, *aspects)
44
+ aspects.each do |aspect|
45
+ unless ASPECTS.include?(aspect)
46
+ Compass::Util.compass_warn "Unknown support aspect: #{aspect}"
47
+ next
48
+ end
49
+ SIMPLE_FUNCTIONS[function.to_s].reject!{|a| a == aspect.to_s}
50
+ end
51
+ end
52
+
53
+ def supports?(function, aspect)
54
+ SIMPLE_FUNCTIONS.has_key?(function.to_s) && SIMPLE_FUNCTIONS[function.to_s].include?(aspect.to_s)
55
+ end
56
+
57
+ def has_aspect?(function)
58
+ SIMPLE_FUNCTIONS.has_key?(function.to_s) && SIMPLE_FUNCTIONS[function.to_s].size > 0
59
+ end
60
+
61
+ end
62
+ end
@@ -54,6 +54,15 @@ Options:
54
54
  parser.parse!
55
55
  parser.options
56
56
  end
57
+ def long_output_string
58
+ lines = []
59
+ lines << "Compass #{::Compass.version[:string]}"
60
+ lines << "Copyright (c) 2008-#{Time.now.year} Chris Eppstein"
61
+ lines << "Released under the MIT License."
62
+ lines << "Compass is charityware."
63
+ lines << "Please make a tax deductable donation for a worthy cause: http://umdf.org/compass"
64
+ lines.join("\n")
65
+ end
57
66
  end
58
67
 
59
68
  attr_accessor :options
@@ -79,13 +88,7 @@ Options:
79
88
  elsif options[:quiet]
80
89
  puts ::Compass.version[:string]
81
90
  else
82
- lines = []
83
- lines << "Compass #{::Compass.version[:string]}"
84
- lines << "Copyright (c) 2008-#{Time.now.year} Chris Eppstein"
85
- lines << "Released under the MIT License."
86
- lines << "Compass is charityware."
87
- lines << "Please make a tax deductable donation: http://umdf.org/compass"
88
- puts lines.join("\n")
91
+ puts self.class.long_output_string
89
92
  end
90
93
  end
91
94
  end