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.
- data/Rakefile +1 -1
- data/VERSION.yml +2 -2
- data/examples/blueprint_plugins/src/link_icons.scss +1 -1
- data/examples/blueprint_semantic/src/liquid.scss +3 -3
- data/examples/blueprint_semantic/src/screen.scss +4 -4
- data/examples/compass/config.rb +1 -0
- data/examples/compass/images/emblem-a043c4f148.png +0 -0
- data/examples/compass/images/emblem/favorite.png +0 -0
- data/examples/compass/images/emblem/important.png +0 -0
- data/examples/compass/images/emblem/photos.png +0 -0
- data/examples/compass/images/emblem/readonly.png +0 -0
- data/examples/compass/images/emblem/symbolic-link.png +0 -0
- data/examples/compass/images/emblem/system.png +0 -0
- data/examples/compass/images/emblem/unreadable.png +0 -0
- data/examples/compass/images/flag-03c3b29b35.png +0 -0
- data/examples/compass/images/flag-21cfbfbfc8.png +0 -0
- data/examples/compass/images/flag/ad.png +0 -0
- data/examples/compass/images/flag/ae.png +0 -0
- data/examples/compass/images/flag/af.png +0 -0
- data/examples/compass/images/flag/ag.png +0 -0
- data/examples/compass/images/flag/ai.png +0 -0
- data/examples/compass/images/flag/al.png +0 -0
- data/examples/compass/images/flag/am.png +0 -0
- data/examples/compass/images/flag/an.png +0 -0
- data/examples/compass/images/flag/ao.png +0 -0
- data/examples/compass/images/flag/ar.png +0 -0
- data/examples/compass/images/flag/as.png +0 -0
- data/examples/compass/images/flag/at.png +0 -0
- data/examples/compass/images/flag/au.png +0 -0
- data/examples/compass/images/flag/aw.png +0 -0
- data/examples/compass/images/flag/ax.png +0 -0
- data/examples/compass/images/flag/az.png +0 -0
- data/examples/compass/images/flag/ba.png +0 -0
- data/examples/compass/images/flag/bb.png +0 -0
- data/examples/compass/images/flag/bd.png +0 -0
- data/examples/compass/images/flag/be.png +0 -0
- data/examples/compass/images/flag/bf.png +0 -0
- data/examples/compass/images/flag/bg.png +0 -0
- data/examples/compass/images/flag/bh.png +0 -0
- data/examples/compass/images/flag/bi.png +0 -0
- data/examples/compass/images/flag/bj.png +0 -0
- data/examples/compass/images/flag/bm.png +0 -0
- data/examples/compass/images/flag/bn.png +0 -0
- data/examples/compass/images/flag/bo.png +0 -0
- data/examples/compass/images/flag/br.png +0 -0
- data/examples/compass/images/flag/bs.png +0 -0
- data/examples/compass/images/flag/bt.png +0 -0
- data/examples/compass/images/flag/bv.png +0 -0
- data/examples/compass/images/flag/bw.png +0 -0
- data/examples/compass/images/flag/by.png +0 -0
- data/examples/compass/images/flag/bz.png +0 -0
- data/examples/compass/images/flag/ca.png +0 -0
- data/examples/compass/images/flag/catalonia.png +0 -0
- data/examples/compass/images/flag/cc.png +0 -0
- data/examples/compass/images/flag/cd.png +0 -0
- data/examples/compass/images/flag/cf.png +0 -0
- data/examples/compass/images/flag/cg.png +0 -0
- data/examples/compass/images/flag/ch.png +0 -0
- data/examples/compass/images/flag/ci.png +0 -0
- data/examples/compass/images/flag/ck.png +0 -0
- data/examples/compass/images/flag/cl.png +0 -0
- data/examples/compass/images/flag/cm.png +0 -0
- data/examples/compass/images/flag/cn.png +0 -0
- data/examples/compass/images/flag/co.png +0 -0
- data/examples/compass/images/flag/cr.png +0 -0
- data/examples/compass/images/flag/cs.png +0 -0
- data/examples/compass/images/flag/cu.png +0 -0
- data/examples/compass/images/flag/cv.png +0 -0
- data/examples/compass/images/flag/cx.png +0 -0
- data/examples/compass/images/flag/cy.png +0 -0
- data/examples/compass/images/flag/cz.png +0 -0
- data/examples/compass/images/flag/de.png +0 -0
- data/examples/compass/images/flag/dj.png +0 -0
- data/examples/compass/images/flag/dk.png +0 -0
- data/examples/compass/images/flag/dm.png +0 -0
- data/examples/compass/images/flag/do.png +0 -0
- data/examples/compass/images/flag/dz.png +0 -0
- data/examples/compass/images/flag/ec.png +0 -0
- data/examples/compass/images/flag/ee.png +0 -0
- data/examples/compass/images/flag/eg.png +0 -0
- data/examples/compass/images/flag/eh.png +0 -0
- data/examples/compass/images/flag/england.png +0 -0
- data/examples/compass/images/flag/er.png +0 -0
- data/examples/compass/images/flag/es.png +0 -0
- data/examples/compass/images/flag/et.png +0 -0
- data/examples/compass/images/flag/europeanunion.png +0 -0
- data/examples/compass/images/flag/fam.png +0 -0
- data/examples/compass/images/flag/fi.png +0 -0
- data/examples/compass/images/flag/fj.png +0 -0
- data/examples/compass/images/flag/fk.png +0 -0
- data/examples/compass/images/flag/fm.png +0 -0
- data/examples/compass/images/flag/fo.png +0 -0
- data/examples/compass/images/flag/fr.png +0 -0
- data/examples/compass/images/flag/ga.png +0 -0
- data/examples/compass/images/flag/gb.png +0 -0
- data/examples/compass/images/flag/gd.png +0 -0
- data/examples/compass/images/flag/ge.png +0 -0
- data/examples/compass/images/flag/gf.png +0 -0
- data/examples/compass/images/flag/gh.png +0 -0
- data/examples/compass/images/flag/gi.png +0 -0
- data/examples/compass/images/flag/gl.png +0 -0
- data/examples/compass/images/flag/gm.png +0 -0
- data/examples/compass/images/flag/gn.png +0 -0
- data/examples/compass/images/flag/gp.png +0 -0
- data/examples/compass/images/flag/gq.png +0 -0
- data/examples/compass/images/flag/gr.png +0 -0
- data/examples/compass/images/flag/gs.png +0 -0
- data/examples/compass/images/flag/gt.png +0 -0
- data/examples/compass/images/flag/gu.png +0 -0
- data/examples/compass/images/flag/gw.png +0 -0
- data/examples/compass/images/flag/gy.png +0 -0
- data/examples/compass/images/flag/hk.png +0 -0
- data/examples/compass/images/flag/hm.png +0 -0
- data/examples/compass/images/flag/hn.png +0 -0
- data/examples/compass/images/flag/hr.png +0 -0
- data/examples/compass/images/flag/ht.png +0 -0
- data/examples/compass/images/flag/hu.png +0 -0
- data/examples/compass/images/flag/id-2.png +0 -0
- data/examples/compass/images/flag/ie.png +0 -0
- data/examples/compass/images/flag/il.png +0 -0
- data/examples/compass/images/flag/in.png +0 -0
- data/examples/compass/images/flag/io.png +0 -0
- data/examples/compass/images/flag/iq.png +0 -0
- data/examples/compass/images/flag/ir.png +0 -0
- data/examples/compass/images/flag/is.png +0 -0
- data/examples/compass/images/flag/it.png +0 -0
- data/examples/compass/images/flag/jm.png +0 -0
- data/examples/compass/images/flag/jo.png +0 -0
- data/examples/compass/images/flag/jp.png +0 -0
- data/examples/compass/images/flag/ke.png +0 -0
- data/examples/compass/images/flag/kg.png +0 -0
- data/examples/compass/images/flag/kh.png +0 -0
- data/examples/compass/images/flag/ki.png +0 -0
- data/examples/compass/images/flag/km.png +0 -0
- data/examples/compass/images/flag/kn.png +0 -0
- data/examples/compass/images/flag/kp.png +0 -0
- data/examples/compass/images/flag/kr.png +0 -0
- data/examples/compass/images/flag/kw.png +0 -0
- data/examples/compass/images/flag/ky.png +0 -0
- data/examples/compass/images/flag/kz.png +0 -0
- data/examples/compass/images/flag/la.png +0 -0
- data/examples/compass/images/flag/lb.png +0 -0
- data/examples/compass/images/flag/lc.png +0 -0
- data/examples/compass/images/flag/li.png +0 -0
- data/examples/compass/images/flag/lk.png +0 -0
- data/examples/compass/images/flag/lr.png +0 -0
- data/examples/compass/images/flag/ls.png +0 -0
- data/examples/compass/images/flag/lt.png +0 -0
- data/examples/compass/images/flag/lu.png +0 -0
- data/examples/compass/images/flag/lv.png +0 -0
- data/examples/compass/images/flag/ly.png +0 -0
- data/examples/compass/images/flag/ma.png +0 -0
- data/examples/compass/images/flag/mc.png +0 -0
- data/examples/compass/images/flag/md.png +0 -0
- data/examples/compass/images/flag/me.png +0 -0
- data/examples/compass/images/flag/mg.png +0 -0
- data/examples/compass/images/flag/mh.png +0 -0
- data/examples/compass/images/flag/mk.png +0 -0
- data/examples/compass/images/flag/ml.png +0 -0
- data/examples/compass/images/flag/mm.png +0 -0
- data/examples/compass/images/flag/mn.png +0 -0
- data/examples/compass/images/flag/mo.png +0 -0
- data/examples/compass/images/flag/mp.png +0 -0
- data/examples/compass/images/flag/mq.png +0 -0
- data/examples/compass/images/flag/mr.png +0 -0
- data/examples/compass/images/flag/ms.png +0 -0
- data/examples/compass/images/flag/mt.png +0 -0
- data/examples/compass/images/flag/mu.png +0 -0
- data/examples/compass/images/flag/mv.png +0 -0
- data/examples/compass/images/flag/mw.png +0 -0
- data/examples/compass/images/flag/mx.png +0 -0
- data/examples/compass/images/flag/my.png +0 -0
- data/examples/compass/images/flag/mz.png +0 -0
- data/examples/compass/images/flag/na.png +0 -0
- data/examples/compass/images/flag/nc.png +0 -0
- data/examples/compass/images/flag/ne.png +0 -0
- data/examples/compass/images/flag/nf.png +0 -0
- data/examples/compass/images/flag/ng.png +0 -0
- data/examples/compass/images/flag/ni.png +0 -0
- data/examples/compass/images/flag/nl.png +0 -0
- data/examples/compass/images/flag/no.png +0 -0
- data/examples/compass/images/flag/np.png +0 -0
- data/examples/compass/images/flag/nr.png +0 -0
- data/examples/compass/images/flag/nu.png +0 -0
- data/examples/compass/images/flag/nz.png +0 -0
- data/examples/compass/images/flag/om.png +0 -0
- data/examples/compass/images/flag/pa.png +0 -0
- data/examples/compass/images/flag/pe.png +0 -0
- data/examples/compass/images/flag/pf.png +0 -0
- data/examples/compass/images/flag/pg.png +0 -0
- data/examples/compass/images/flag/ph.png +0 -0
- data/examples/compass/images/flag/pk.png +0 -0
- data/examples/compass/images/flag/pl.png +0 -0
- data/examples/compass/images/flag/pm.png +0 -0
- data/examples/compass/images/flag/pn.png +0 -0
- data/examples/compass/images/flag/pr.png +0 -0
- data/examples/compass/images/flag/ps.png +0 -0
- data/examples/compass/images/flag/pt.png +0 -0
- data/examples/compass/images/flag/pw.png +0 -0
- data/examples/compass/images/flag/py.png +0 -0
- data/examples/compass/images/flag/qa.png +0 -0
- data/examples/compass/images/flag/re.png +0 -0
- data/examples/compass/images/flag/ro.png +0 -0
- data/examples/compass/images/flag/rs.png +0 -0
- data/examples/compass/images/flag/ru.png +0 -0
- data/examples/compass/images/flag/rw.png +0 -0
- data/examples/compass/images/flag/sa.png +0 -0
- data/examples/compass/images/flag/sb.png +0 -0
- data/examples/compass/images/flag/sc.png +0 -0
- data/examples/compass/images/flag/scotland.png +0 -0
- data/examples/compass/images/flag/sd.png +0 -0
- data/examples/compass/images/flag/se.png +0 -0
- data/examples/compass/images/flag/sg.png +0 -0
- data/examples/compass/images/flag/sh.png +0 -0
- data/examples/compass/images/flag/si.png +0 -0
- data/examples/compass/images/flag/sj.png +0 -0
- data/examples/compass/images/flag/sk.png +0 -0
- data/examples/compass/images/flag/sl.png +0 -0
- data/examples/compass/images/flag/sm.png +0 -0
- data/examples/compass/images/flag/sn.png +0 -0
- data/examples/compass/images/flag/so.png +0 -0
- data/examples/compass/images/flag/sr.png +0 -0
- data/examples/compass/images/flag/st.png +0 -0
- data/examples/compass/images/flag/sv.png +0 -0
- data/examples/compass/images/flag/sy.png +0 -0
- data/examples/compass/images/flag/sz.png +0 -0
- data/examples/compass/images/flag/tc.png +0 -0
- data/examples/compass/images/flag/td.png +0 -0
- data/examples/compass/images/flag/tf.png +0 -0
- data/examples/compass/images/flag/tg.png +0 -0
- data/examples/compass/images/flag/th.png +0 -0
- data/examples/compass/images/flag/tj.png +0 -0
- data/examples/compass/images/flag/tk.png +0 -0
- data/examples/compass/images/flag/tl.png +0 -0
- data/examples/compass/images/flag/tm.png +0 -0
- data/examples/compass/images/flag/tn.png +0 -0
- data/examples/compass/images/flag/to.png +0 -0
- data/examples/compass/images/flag/tr.png +0 -0
- data/examples/compass/images/flag/tt.png +0 -0
- data/examples/compass/images/flag/tv.png +0 -0
- data/examples/compass/images/flag/tw.png +0 -0
- data/examples/compass/images/flag/tz.png +0 -0
- data/examples/compass/images/flag/ua.png +0 -0
- data/examples/compass/images/flag/ug.png +0 -0
- data/examples/compass/images/flag/um.png +0 -0
- data/examples/compass/images/flag/us.png +0 -0
- data/examples/compass/images/flag/uy.png +0 -0
- data/examples/compass/images/flag/uz.png +0 -0
- data/examples/compass/images/flag/va.png +0 -0
- data/examples/compass/images/flag/vc.png +0 -0
- data/examples/compass/images/flag/ve.png +0 -0
- data/examples/compass/images/flag/vg.png +0 -0
- data/examples/compass/images/flag/vi.png +0 -0
- data/examples/compass/images/flag/vn.png +0 -0
- data/examples/compass/images/flag/vu.png +0 -0
- data/examples/compass/images/flag/wales.png +0 -0
- data/examples/compass/images/flag/wf.png +0 -0
- data/examples/compass/images/flag/ws.png +0 -0
- data/examples/compass/images/flag/ye.png +0 -0
- data/examples/compass/images/flag/yt.png +0 -0
- data/examples/compass/images/flag/za.png +0 -0
- data/examples/compass/images/flag/zm.png +0 -0
- data/examples/compass/images/flag/zw.png +0 -0
- data/examples/compass/sprites.html.haml +37 -0
- data/examples/compass/src/sprites.scss +25 -0
- data/examples/compass/src/sticky_footer.scss +1 -1
- data/examples/compass/src/utilities.scss +1 -1
- data/examples/css3/src/gradients.scss +30 -30
- data/examples/css3/src/main.scss +13 -19
- data/features/rails_integration.feature +32 -0
- data/frameworks/blueprint/stylesheets/blueprint/_grid.scss +16 -9
- data/frameworks/blueprint/stylesheets/blueprint/_liquid.scss +11 -6
- data/frameworks/compass/stylesheets/compass/_support.scss +8 -5
- data/frameworks/compass/stylesheets/compass/css3/_images.scss +6 -2
- data/frameworks/compass/stylesheets/compass/css3/_opacity.scss +6 -11
- data/frameworks/compass/stylesheets/compass/css3/_transform.scss +20 -6
- data/frameworks/compass/stylesheets/compass/utilities/sprites/_base.scss +3 -2
- data/lib/compass.rb +1 -1
- data/lib/compass/app_integration/rails.rb +3 -3
- data/lib/compass/app_integration/rails/actionpack2/urls.rb +2 -2
- data/lib/compass/app_integration/rails/actionpack3/railtie.rb +39 -11
- data/lib/compass/app_integration/rails/configuration_defaults.rb +14 -8
- data/lib/compass/browser_support.rb +62 -0
- data/lib/compass/commands/print_version.rb +10 -7
- data/lib/compass/commands/project_base.rb +1 -1
- data/lib/compass/commands/watch_project.rb +17 -0
- data/lib/compass/configuration/data.rb +15 -0
- data/lib/compass/configuration/helpers.rb +7 -8
- data/lib/compass/configuration/inheritance.rb +14 -0
- data/lib/compass/configuration/serialization.rb +8 -4
- data/lib/compass/sass_extensions/functions.rb +2 -1
- data/lib/compass/sass_extensions/functions/colors.rb +2 -3
- data/lib/compass/sass_extensions/functions/cross_browser_support.rb +39 -0
- data/lib/compass/sass_extensions/functions/gradient_support.rb +87 -379
- data/lib/compass/sass_extensions/functions/lists.rb +84 -0
- data/lib/compass/sass_extensions/functions/sprites.rb +4 -2
- data/lib/compass/sass_extensions/monkey_patches.rb +1 -1
- data/lib/compass/sass_extensions/monkey_patches/browser_support.rb +89 -0
- data/lib/compass/sprites.rb +4 -4
- data/test/fixtures/stylesheets/blueprint/css/screen.css +24 -24
- data/test/fixtures/stylesheets/blueprint/css/single-imports/grid.css +24 -24
- data/test/fixtures/stylesheets/blueprint/css/single-imports/rtl.css +24 -24
- data/test/fixtures/stylesheets/compass/css/gradients.css +21 -6
- data/test/fixtures/stylesheets/compass/css/opacity.css +4 -0
- data/test/fixtures/stylesheets/compass/css/pie.css +0 -1
- data/test/fixtures/stylesheets/compass/sass/gradients.sass +9 -0
- data/test/fixtures/stylesheets/compass/sass/opacity.scss +5 -0
- data/test/rails_integration_test.rb +3 -3
- 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
|
-
|
|
57
|
+
width: span($n); } }
|
|
58
58
|
.span-#{$blueprint-grid-columns} {
|
|
59
59
|
@extend .column;
|
|
60
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
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: $
|
|
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
|
-
|
|
90
|
-
|
|
91
|
-
@
|
|
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
|
-
|
|
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
|
|
12
|
-
// But in case the user set
|
|
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
|
-
|
|
58
|
-
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
//
|
|
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
|
-
|
|
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
|
-
|
|
65
|
+
|
|
66
|
+
// The default angle for rotations
|
|
61
67
|
$default-rotate : 45deg !default;
|
|
62
68
|
|
|
63
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
}
|
data/lib/compass.rb
CHANGED
|
@@ -34,9 +34,9 @@ module Compass
|
|
|
34
34
|
end
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
-
def initialize!
|
|
38
|
-
|
|
39
|
-
Compass.add_project_configuration(
|
|
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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
#
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
|
|
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
|
-
"
|
|
39
|
+
"#{top_level.http_path}images"
|
|
34
40
|
end
|
|
35
41
|
|
|
36
42
|
def default_http_javascripts_path
|
|
37
|
-
"
|
|
43
|
+
"#{top_level.http_path}javascripts"
|
|
38
44
|
end
|
|
39
45
|
|
|
40
46
|
def default_http_fonts_path
|
|
41
|
-
"
|
|
47
|
+
"#{top_level.http_path}fonts"
|
|
42
48
|
end
|
|
43
49
|
|
|
44
50
|
def default_http_stylesheets_path
|
|
45
|
-
"
|
|
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
|
-
|
|
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
|