simple-compass 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. data/.gitignore +2 -0
  2. data/.rspec +1 -0
  3. data/Gemfile +6 -0
  4. data/Gemfile.lock +26 -0
  5. data/Rakefile +8 -0
  6. data/lib/simple-compass.rb +17 -0
  7. data/lib/simple-compass/sass/functions/display.rb +27 -0
  8. data/lib/simple-compass/sass/functions/lists.rb +101 -0
  9. data/lib/simple-compass/sass/functions/selectors.rb +64 -0
  10. data/lib/simple-compass/sass/functions/sprites.rb +218 -0
  11. data/lib/simple-compass/version.rb +3 -0
  12. data/sass/compass.scss +1 -0
  13. data/sass/compass/_css3.scss +20 -0
  14. data/sass/compass/_layout.scss +3 -0
  15. data/sass/compass/_reset-legacy.scss +3 -0
  16. data/sass/compass/_reset.scss +3 -0
  17. data/sass/compass/_support.scss +40 -0
  18. data/sass/compass/_typography.scss +4 -0
  19. data/sass/compass/_utilities.scss +9 -0
  20. data/sass/compass/css3/_appearance.scss +17 -0
  21. data/sass/compass/css3/_background-clip.scss +43 -0
  22. data/sass/compass/css3/_background-origin.scss +42 -0
  23. data/sass/compass/css3/_background-size.scss +26 -0
  24. data/sass/compass/css3/_border-radius.scss +130 -0
  25. data/sass/compass/css3/_box-shadow.scss +76 -0
  26. data/sass/compass/css3/_box-sizing.scss +13 -0
  27. data/sass/compass/css3/_box.scss +111 -0
  28. data/sass/compass/css3/_columns.scss +157 -0
  29. data/sass/compass/css3/_filter.scss +23 -0
  30. data/sass/compass/css3/_font-face.scss +48 -0
  31. data/sass/compass/css3/_hyphenation.scss +77 -0
  32. data/sass/compass/css3/_images.scss +132 -0
  33. data/sass/compass/css3/_inline-block.scss +22 -0
  34. data/sass/compass/css3/_opacity.scss +19 -0
  35. data/sass/compass/css3/_pie.scss +73 -0
  36. data/sass/compass/css3/_regions.scss +22 -0
  37. data/sass/compass/css3/_shared.scss +38 -0
  38. data/sass/compass/css3/_text-shadow.scss +87 -0
  39. data/sass/compass/css3/_transform-legacy.scss +87 -0
  40. data/sass/compass/css3/_transform.scss +598 -0
  41. data/sass/compass/css3/_transition.scss +221 -0
  42. data/sass/compass/css3/_user-interface.scss +17 -0
  43. data/sass/compass/layout/_grid-background.scss +178 -0
  44. data/sass/compass/layout/_sticky-footer.scss +23 -0
  45. data/sass/compass/layout/_stretching.scss +24 -0
  46. data/sass/compass/reset/_utilities-legacy.scss +135 -0
  47. data/sass/compass/reset/_utilities.scss +142 -0
  48. data/sass/compass/typography/_links.scss +3 -0
  49. data/sass/compass/typography/_lists.scss +4 -0
  50. data/sass/compass/typography/_text.scss +4 -0
  51. data/sass/compass/typography/_vertical_rhythm.scss +221 -0
  52. data/sass/compass/typography/links/_hover-link.scss +5 -0
  53. data/sass/compass/typography/links/_link-colors.scss +28 -0
  54. data/sass/compass/typography/links/_unstyled-link.scss +7 -0
  55. data/sass/compass/typography/lists/_bullets.scss +34 -0
  56. data/sass/compass/typography/lists/_horizontal-list.scss +61 -0
  57. data/sass/compass/typography/lists/_inline-block-list.scss +50 -0
  58. data/sass/compass/typography/lists/_inline-list.scss +44 -0
  59. data/sass/compass/typography/text/_ellipsis.scss +25 -0
  60. data/sass/compass/typography/text/_force-wrap.scss +12 -0
  61. data/sass/compass/typography/text/_nowrap.scss +2 -0
  62. data/sass/compass/typography/text/_replacement.scss +68 -0
  63. data/sass/compass/utilities/_color.scss +1 -0
  64. data/sass/compass/utilities/_general.scss +6 -0
  65. data/sass/compass/utilities/_links.scss +5 -0
  66. data/sass/compass/utilities/_lists.scss +6 -0
  67. data/sass/compass/utilities/_print.scss +17 -0
  68. data/sass/compass/utilities/_sprites.scss +2 -0
  69. data/sass/compass/utilities/_tables.scss +3 -0
  70. data/sass/compass/utilities/_text.scss +5 -0
  71. data/sass/compass/utilities/color/_contrast.scss +28 -0
  72. data/sass/compass/utilities/general/_clearfix.scss +44 -0
  73. data/sass/compass/utilities/general/_float.scss +30 -0
  74. data/sass/compass/utilities/general/_hacks.scss +46 -0
  75. data/sass/compass/utilities/general/_min.scss +16 -0
  76. data/sass/compass/utilities/general/_reset.scss +2 -0
  77. data/sass/compass/utilities/general/_tabs.scss +1 -0
  78. data/sass/compass/utilities/general/_tag-cloud.scss +18 -0
  79. data/sass/compass/utilities/links/_hover-link.scss +3 -0
  80. data/sass/compass/utilities/links/_link-colors.scss +3 -0
  81. data/sass/compass/utilities/links/_unstyled-link.scss +3 -0
  82. data/sass/compass/utilities/lists/_bullets.scss +3 -0
  83. data/sass/compass/utilities/lists/_horizontal-list.scss +3 -0
  84. data/sass/compass/utilities/lists/_inline-block-list.scss +3 -0
  85. data/sass/compass/utilities/lists/_inline-list.scss +3 -0
  86. data/sass/compass/utilities/sprites/_base.scss +66 -0
  87. data/sass/compass/utilities/sprites/_sprite-img.scss +79 -0
  88. data/sass/compass/utilities/tables/_alternating-rows-and-columns.scss +22 -0
  89. data/sass/compass/utilities/tables/_borders.scss +33 -0
  90. data/sass/compass/utilities/tables/_scaffolding.scss +9 -0
  91. data/sass/compass/utilities/text/_ellipsis.scss +3 -0
  92. data/sass/compass/utilities/text/_nowrap.scss +3 -0
  93. data/sass/compass/utilities/text/_replacement.scss +3 -0
  94. data/simple-compass.gemspec +21 -0
  95. data/spec/fixtures/headings_test.sass +2 -0
  96. data/spec/fixtures/opacity_test.sass +7 -0
  97. data/spec/fixtures/reset_test.sass +1 -0
  98. data/spec/headings_spec.rb +9 -0
  99. data/spec/opacity_spec.rb +9 -0
  100. data/spec/reset_spec.rb +9 -0
  101. data/spec/spec_helper.rb +7 -0
  102. metadata +169 -0
@@ -0,0 +1,111 @@
1
+ @import "shared";
2
+
3
+ // display:box; must be used for any of the other flexbox mixins to work properly
4
+ @mixin display-box {
5
+ @include experimental-value(display, box,
6
+ -moz, -webkit, not -o, -ms, not -khtml, official
7
+ );
8
+ }
9
+
10
+ // Default box orientation, assuming that the user wants something less block-like
11
+ $default-box-orient: horizontal !default;
12
+
13
+ // Box orientation [ horizontal | vertical | inline-axis | block-axis | inherit ]
14
+ @mixin box-orient(
15
+ $orientation: $default-box-orient
16
+ ) {
17
+ $orientation : unquote($orientation);
18
+ @include experimental(box-orient, $orientation,
19
+ -moz, -webkit, not -o, -ms, not -khtml, official
20
+ );
21
+ }
22
+
23
+ // Default box-align
24
+ $default-box-align: stretch !default;
25
+
26
+ // Box align [ start | end | center | baseline | stretch ]
27
+ @mixin box-align(
28
+ $alignment: $default-box-align
29
+ ) {
30
+ $alignment : unquote($alignment);
31
+ @include experimental(box-align, $alignment,
32
+ -moz, -webkit, not -o, -ms, not -khtml, official
33
+ );
34
+ }
35
+
36
+ // Default box flex
37
+ $default-box-flex: 0 !default;
38
+
39
+ // mixin which takes an int argument for box flex. Apply this to the children inside the box.
40
+ //
41
+ // For example: "div.display-box > div.child-box" would get the box flex mixin.
42
+ @mixin box-flex(
43
+ $flex: $default-box-flex
44
+ ) {
45
+ @include experimental(box-flex, $flex,
46
+ -moz, -webkit, not -o, -ms, not -khtml, official
47
+ );
48
+ }
49
+
50
+ // Default flex group
51
+ $default-box-flex-group: 1 !default;
52
+
53
+ // mixin which takes an int argument for flexible grouping
54
+ @mixin box-flex-group(
55
+ $group: $default-box-flex-group
56
+ ) {
57
+ @include experimental(box-flex-group, $group,
58
+ -moz, -webkit, not -o, -ms, not -khtml, official
59
+ );
60
+ }
61
+
62
+ // default for ordinal group
63
+ $default-box-ordinal-group: 1 !default;
64
+
65
+ // mixin which takes an int argument for ordinal grouping and rearranging the order
66
+ @mixin box-ordinal-group(
67
+ $group: $default-ordinal-flex-group
68
+ ) {
69
+ @include experimental(box-ordinal-group, $group,
70
+ -moz, -webkit, not -o, -ms, not -khtml, official
71
+ );
72
+ }
73
+
74
+ // Box direction default value
75
+ $default-box-direction: normal !default;
76
+
77
+ // mixin for box-direction [ normal | reverse | inherit ]
78
+ @mixin box-direction(
79
+ $direction: $default-box-direction
80
+ ) {
81
+ $direction: unquote($direction);
82
+ @include experimental(box-direction, $direction,
83
+ -moz, -webkit, not -o, -ms, not -khtml, official
84
+ );
85
+ }
86
+
87
+ // default for box lines
88
+ $default-box-lines: single !default;
89
+
90
+ // mixin for box lines [ single | multiple ]
91
+ @mixin box-lines(
92
+ $lines: $default-box-lines
93
+ ) {
94
+ $lines: unquote($lines);
95
+ @include experimental(box-lines, $lines,
96
+ -moz, -webkit, not -o, -ms, not -khtml, official
97
+ );
98
+ }
99
+
100
+ // default for box pack
101
+ $default-box-pack: start !default;
102
+
103
+ // mixin for box pack [ start | end | center | justify ]
104
+ @mixin box-pack(
105
+ $pack: $default-box-pack
106
+ ) {
107
+ $pack: unquote($pack);
108
+ @include experimental(box-pack, $pack,
109
+ -moz, -webkit, not -o, -ms, not -khtml, official
110
+ );
111
+ }
@@ -0,0 +1,157 @@
1
+ @import "shared";
2
+
3
+ // Specify the shorthand `columns` property.
4
+ //
5
+ // Example:
6
+ //
7
+ // @include columns(20em 2)
8
+ @mixin columns($width-and-count) {
9
+ @include experimental(columns, $width-and-count,
10
+ -moz, -webkit, -o, -ms, not -khtml, official
11
+ );
12
+ }
13
+
14
+ // Specify the number of columns
15
+ @mixin column-count($count) {
16
+ @include experimental(column-count, $count,
17
+ -moz, -webkit, -o, -ms, not -khtml, official
18
+ );
19
+ }
20
+
21
+ // Specify the gap between columns e.g. `20px`
22
+ @mixin column-gap($width) {
23
+ @include experimental(column-gap, $width,
24
+ -moz, -webkit, -o, -ms, not -khtml, official
25
+ );
26
+ }
27
+
28
+ // Specify the width of columns e.g. `100px`
29
+ @mixin column-width($width) {
30
+ @include experimental(column-width, $width,
31
+ -moz, -webkit, -o, -ms, not -khtml, official
32
+ );
33
+ }
34
+
35
+ // Specify how many columns an element should span across.
36
+ //
37
+ // * legal values are 1, all
38
+ @mixin column-span($columns) {
39
+ @include experimental(column-span, $columns,
40
+ -moz, -webkit, -o, -ms, not -khtml, official
41
+ );
42
+ }
43
+
44
+ // Specify the width of the rule between columns e.g. `1px`
45
+ @mixin column-rule-width($width) {
46
+ @include experimental(column-rule-width, $width,
47
+ -moz, -webkit, -o, -ms, not -khtml, official
48
+ );
49
+ }
50
+
51
+ // Specify the style of the rule between columns e.g. `dotted`.
52
+ // This works like border-style.
53
+ @mixin column-rule-style($style) {
54
+ @include experimental(column-rule-style, unquote($style),
55
+ -moz, -webkit, -o, -ms, not -khtml, official
56
+ );
57
+ }
58
+
59
+ // Specify the color of the rule between columns e.g. `blue`.
60
+ // This works like border-color.
61
+ @mixin column-rule-color($color) {
62
+ @include experimental(column-rule-color, $color,
63
+ -moz, -webkit, -o, -ms, not -khtml, official
64
+ );
65
+ }
66
+
67
+ // Mixin encompassing all column rule properties
68
+ // For example:
69
+ //
70
+ // @include column-rule(1px, solid, #c00)
71
+ //
72
+ // Or the values can be space separated:
73
+ //
74
+ // @include column-rule(1px solid #c00)
75
+ @mixin column-rule($width, $style: false, $color: false) {
76
+ $full : -compass-space-list(compact($width, $style, $color));
77
+ @include experimental(column-rule, $full,
78
+ -moz, -webkit, -o, -ms, not -khtml, official
79
+ );
80
+ }
81
+
82
+ // Mixin for setting column-break-before
83
+ //
84
+ // * legal values are auto, always, avoid, left, right, page, column, avoid-page, avoid-column
85
+ //
86
+ // Example:
87
+ // h2.before {@include column-break-before(always);}
88
+ //
89
+ // Which generates:
90
+ //
91
+ // h2.before {
92
+ // -webkit-column-break-before: always;
93
+ // column-break-before: always;}
94
+ @mixin column-break-before($value: auto){
95
+ @include experimental(column-break-before, $value, not -moz, -webkit, not -o, not -ms, not -khtml, official );
96
+ }
97
+
98
+ // Mixin for setting column-break-after
99
+ //
100
+ // * legal values are auto, always, avoid, left, right, page, column, avoid-page, avoid-column
101
+ //
102
+ // Example:
103
+ // h2.after {@include column-break-after(always); }
104
+ //
105
+ // Which generates:
106
+ //
107
+ // h2.after {
108
+ // -webkit-column-break-after: always;
109
+ // column-break-after: always; }
110
+ @mixin column-break-after($value: auto){
111
+ @include experimental(column-break-after, $value, not -moz, -webkit, not -o, not -ms, not -khtml, official );
112
+ }
113
+
114
+ // Mixin for setting column-break-inside
115
+ //
116
+ // * legal values are auto, avoid, avoid-page, avoid-column
117
+ //
118
+ // Example:
119
+ // h2.inside {@include column-break-inside();}
120
+ // Which generates:
121
+ //
122
+ // h2.inside {
123
+ // -webkit-column-break-inside: auto;
124
+ // column-break-inside: auto;}
125
+ @mixin column-break-inside($value: auto){
126
+ @include experimental(column-break-inside, $value, not -moz, -webkit, not -o, not -ms, not -khtml, official );
127
+ }
128
+
129
+ // All-purpose mixin for setting column breaks.
130
+ //
131
+ // * legal values for $type : before, after, inside
132
+ // * legal values for '$value' are dependent on $type
133
+ // * when $type = before, legal values are auto, always, avoid, left, right, page, column, avoid-page, avoid-column
134
+ // * when $type = after, legal values are auto, always, avoid, left, right, page, column, avoid-page, avoid-column
135
+ // * when $type = inside, legal values are auto, avoid, avoid-page, avoid-column
136
+ //
137
+ // Examples:
138
+ // h2.before {@include column-break(before, always);}
139
+ // h2.after {@include column-break(after, always); }
140
+ // h2.inside {@include column-break(inside); }
141
+ //
142
+ // Which generates:
143
+ // h2.before {
144
+ // -webkit-column-break-before: always;
145
+ // column-break-before: always;}
146
+ //
147
+ // h2.after {
148
+ // -webkit-column-break-after: always;
149
+ // column-break-after: always; }
150
+ //
151
+ // h2.inside {
152
+ // -webkit-column-break-inside: auto;
153
+ // column-break-inside: auto;}
154
+
155
+ @mixin column-break($type: before, $value: auto){
156
+ @include experimental("column-break-#{$type}", $value, not -moz, -webkit, not -o, not -ms, not -khtml, official );
157
+ }
@@ -0,0 +1,23 @@
1
+ @import "shared";
2
+
3
+ // Provides cross-browser support for the upcoming (?) css3 filter property.
4
+ //
5
+ // Each filter argument should adhere to the standard css3 syntax for the
6
+ // filter property.
7
+ @mixin filter (
8
+ $filter-1,
9
+ $filter-2 : false,
10
+ $filter-3 : false,
11
+ $filter-4 : false,
12
+ $filter-5 : false,
13
+ $filter-6 : false,
14
+ $filter-7 : false,
15
+ $filter-8 : false,
16
+ $filter-9 : false,
17
+ $filter-10: false
18
+ ) {
19
+ $filter : compact($filter-1, $filter-2, $filter-3, $filter-4, $filter-5, $filter-6, $filter-7, $filter-8, $filter-9, $filter-10);
20
+ @include experimental(filter, $filter,
21
+ -moz, -webkit, not -o, not -ms, not -khtml, official
22
+ );
23
+ }
@@ -0,0 +1,48 @@
1
+ @import "shared";
2
+
3
+ // Cross-browser support for @font-face. Supports IE, Gecko, Webkit, Opera.
4
+ //
5
+ // * $name is required, arbitrary, and what you will use in font stacks.
6
+ // * $font-files is required using font-files('relative/location', 'format').
7
+ // for best results use this order: woff, opentype/truetype, svg
8
+ // * $eot is required by IE, and is a relative location of the eot file.
9
+ // * $weight shows if the font is bold, defaults to normal
10
+ // * $style defaults to normal, might be also italic
11
+ // * For android 2.2 Compatiblity, please ensure that your web page has
12
+ // a meta viewport tag.
13
+ // * To support iOS < 4.2, an SVG file must be provided
14
+ //
15
+ // If you need to generate other formats check out the Font Squirrel
16
+ // [font generator](http://www.fontsquirrel.com/fontface/generator)
17
+ //
18
+
19
+ // In order to refer to a specific style of the font in your stylesheets as
20
+ // e.g. "font-style: italic;", you may add a couple of @font-face includes
21
+ // containing the respective font files for each style and specying
22
+ // respective the $style parameter.
23
+
24
+ // Order of the includes matters, and it is: normal, bold, italic, bold+italic.
25
+
26
+ @mixin font-face(
27
+ $name,
28
+ $font-files,
29
+ $eot: false,
30
+ $weight: false,
31
+ $style: false
32
+ ) {
33
+ $iefont: unquote("#{$eot}?#iefix");
34
+ @font-face {
35
+ font-family: quote($name);
36
+ @if $eot {
37
+ src: font-url($eot);
38
+ $font-files: font-url($iefont) unquote("format('eot')"), $font-files;
39
+ }
40
+ src: $font-files;
41
+ @if $weight {
42
+ font-weight: $weight;
43
+ }
44
+ @if $style {
45
+ font-style: $style;
46
+ }
47
+ }
48
+ }
@@ -0,0 +1,77 @@
1
+ @import "shared";
2
+
3
+ // Mixins to support specific CSS Text Level 3 elements
4
+ //
5
+ //
6
+ //
7
+ // Mixin for word-break properties
8
+ // http://www.w3.org/css3-text/#word-break
9
+ // * legal values for $type : normal, keep-all, break-all
10
+ //
11
+ // Example:
12
+ // p.wordBreak {@include word-break(break-all);}
13
+ //
14
+ // Which generates:
15
+ // p.wordBreak {
16
+ // -ms-word-break: break-all;
17
+ // word-break: break-all;
18
+ // word-break: break-word;}
19
+ //
20
+ @mixin word-break($value: normal){
21
+ @if $value == break-all {
22
+ //Most browsers handle the break-all case the same...
23
+ @include experimental(word-break, $value,
24
+ not -moz, not -webkit, not -o, -ms, not -khtml, official
25
+ );
26
+ //Webkit handles break-all differently... as break-word
27
+ @include experimental(word-break, break-word,
28
+ not -moz, not -webkit, not -o, not -ms, not -khtml, official
29
+ );
30
+ }
31
+ @else {
32
+ @include experimental(word-break, $value,
33
+ not -moz, not -webkit, not -o, -ms, not -khtml, official
34
+ );
35
+ }
36
+ }
37
+
38
+ // Mixin for the hyphens property
39
+ //
40
+ // W3C specification: http://www.w3.org/TR/css3-text/#hyphens
41
+ // * legal values for $type : auto, manual, none
42
+ //
43
+ // Example:
44
+ // p {
45
+ // @include hyphens(auto);}
46
+ // Which generates:
47
+ // p {
48
+ // -moz-hyphens: auto;
49
+ // -webkit-hyphens: auto;
50
+ // hyphens: auto;}
51
+ //
52
+ @mixin hyphens($value: auto){
53
+ @include experimental(hyphens, $value,
54
+ -moz, -webkit, not -o, not -ms, not -khtml, official
55
+ );
56
+ }
57
+
58
+ // Mixin for x-browser hyphenation based on @auchenberg's post:
59
+ // Removes the need for the <wbr/> HTML tag
60
+ // http://blog.kenneth.io/blog/2012/03/04/word-wrapping-hypernation-using-css/
61
+ //
62
+ // Example:
63
+ // div {@include hyphenation;}
64
+ //
65
+ // Which generates:
66
+ // div {
67
+ // -ms-word-break: break-all;
68
+ // word-break: break-all;
69
+ // word-break: break-word;
70
+ // -moz-hyphens: auto;
71
+ // -webkit-hyphens: auto;
72
+ // hyphens: auto;}
73
+ //
74
+ @mixin hyphenation{
75
+ @include word-break(break-all);
76
+ @include hyphens;
77
+ }
@@ -0,0 +1,132 @@
1
+ @import "shared";
2
+ @import "compass/utilities/general/hacks";
3
+
4
+ // Background property support for vendor prefixing within values.
5
+ @mixin background(
6
+ $background-1,
7
+ $background-2: false,
8
+ $background-3: false,
9
+ $background-4: false,
10
+ $background-5: false,
11
+ $background-6: false,
12
+ $background-7: false,
13
+ $background-8: false,
14
+ $background-9: false,
15
+ $background-10: false
16
+ ) {
17
+ $backgrounds: compact($background-1, $background-2, $background-3, $background-4, $background-5,
18
+ $background-6, $background-7, $background-8, $background-9, $background-10);
19
+ $mult-bgs: -compass-list-size($backgrounds) > 1;
20
+ $add-pie-bg: prefixed(-pie, $backgrounds) or $mult-bgs;
21
+ @if $experimental-support-for-svg and prefixed(-svg, $backgrounds) { background: -svg($backgrounds); }
22
+ @if $support-for-original-webkit-gradients and prefixed(-owg, $backgrounds) { background: -owg($backgrounds); }
23
+ @if $experimental-support-for-webkit and prefixed(-webkit, $backgrounds) { background: -webkit($backgrounds); }
24
+ @if $experimental-support-for-mozilla and prefixed(-moz, $backgrounds) { background: -moz($backgrounds); }
25
+ @if $experimental-support-for-opera and prefixed(-o, $backgrounds) { background: -o($backgrounds); }
26
+ @if $experimental-support-for-pie and $add-pie-bg { -pie-background: -pie($backgrounds); }
27
+ background: $backgrounds ;
28
+ }
29
+
30
+ @mixin background-with-css2-fallback(
31
+ $background-1,
32
+ $background-2: false,
33
+ $background-3: false,
34
+ $background-4: false,
35
+ $background-5: false,
36
+ $background-6: false,
37
+ $background-7: false,
38
+ $background-8: false,
39
+ $background-9: false,
40
+ $background-10: false
41
+ ) {
42
+ $backgrounds: compact($background-1, $background-2, $background-3, $background-4, $background-5,
43
+ $background-6, $background-7, $background-8, $background-9, $background-10);
44
+ $mult-bgs: -compass-list-size($backgrounds) > 1;
45
+ $simple-background: if($mult-bgs or prefixed(-css2, $backgrounds), -css2(-compass-nth($backgrounds, last)), false);
46
+ @if not blank($simple-background) { background: $simple-background; }
47
+ @include background($background-1, $background-2, $background-3, $background-4, $background-5,
48
+ $background-6, $background-7, $background-8, $background-9, $background-10);
49
+ }
50
+
51
+
52
+ // Background image property support for vendor prefixing within values.
53
+ @mixin background-image(
54
+ $image-1,
55
+ $image-2: false,
56
+ $image-3: false,
57
+ $image-4: false,
58
+ $image-5: false,
59
+ $image-6: false,
60
+ $image-7: false,
61
+ $image-8: false,
62
+ $image-9: false,
63
+ $image-10: false
64
+ ) {
65
+ $images: compact($image-1, $image-2, $image-3, $image-4, $image-5, $image-6, $image-7, $image-8, $image-9, $image-10);
66
+ $add-pie-bg: prefixed(-pie, $images) or -compass-list-size($images) > 1;
67
+
68
+ @if $experimental-support-for-svg and prefixed(-svg, $images) { background-image: -svg($images); background-size: 100%; }
69
+ @if $support-for-original-webkit-gradients and prefixed(-owg, $images) { background-image: -owg($images); }
70
+ @if $experimental-support-for-webkit and prefixed(-webkit, $images) { background-image: -webkit($images); }
71
+ @if $experimental-support-for-mozilla and prefixed(-moz, $images) { background-image: -moz($images); }
72
+ @if $experimental-support-for-opera and prefixed(-o, $images) { background-image: -o($images); }
73
+ @if $experimental-support-for-pie and $add-pie-bg { @warn "PIE does not support background-image. Use @include background(#{$images}) instead." }
74
+ background-image: $images ;
75
+ }
76
+
77
+ // Emit a IE-Specific filters that renders a simple linear gradient.
78
+ // For use in IE 6 - 8. Best practice would have you apply this via a
79
+ // conditional IE stylesheet, but if you must, you should place this before
80
+ // any background-image properties that you have specified.
81
+ //
82
+ // For the `$orientation` parameter, you can pass `vertical` or `horizontal`.
83
+ @mixin filter-gradient($start-color, $end-color, $orientation: vertical) {
84
+ @include has-layout;
85
+ $gradient-type: if($orientation == vertical, 0, 1);
86
+ @if $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8 {
87
+ filter: progid:DXImageTransform.Microsoft.gradient(gradientType=#{$gradient-type}, startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}');
88
+ }
89
+ }
90
+
91
+
92
+ // Border image property support for vendor prefixing properties and values.
93
+ @mixin border-image($value) {
94
+ @if $experimental-support-for-mozilla { -moz-border-image: -moz(reject(-compass-list($value), fill)); }
95
+ @if $support-for-original-webkit-gradients { -webkit-border-image: -owg(reject(-compass-list($value), fill)); }
96
+ @if $experimental-support-for-webkit { -webkit-border-image: -webkit(reject(-compass-list($value), fill)); }
97
+ @if $experimental-support-for-opera { -o-border-image: -o(reject(-compass-list($value), fill)); }
98
+ @if $experimental-support-for-svg { border-image: -svg(reject(-compass-list($value), fill)); }
99
+ border-image: $value;
100
+ }
101
+
102
+ // List style image property support for vendor prefixing within values.
103
+ @mixin list-style-image($image) {
104
+ @if $experimental-support-for-mozilla and prefixed(-moz, $image) { list-style-image: -moz($image); }
105
+ @if $support-for-original-webkit-gradients and prefixed(-owg, $image) { list-style-image: -owg($image); }
106
+ @if $experimental-support-for-webkit and prefixed(-webkit, $image) { list-style-image: -webkit($image); }
107
+ @if $experimental-support-for-opera and prefixed(-o, $image) { list-style-image: -o($image); }
108
+ @if $experimental-support-for-svg and prefixed(-svg, $image) { list-style-image: -svg($image); }
109
+ list-style-image: $image ;
110
+ }
111
+
112
+ // List style property support for vendor prefixing within values.
113
+ @mixin list-style($value) {
114
+ $value: -compass-list($value);
115
+ @if $experimental-support-for-mozilla and prefixed(-moz, $value) { list-style-image: -moz($value); }
116
+ @if $support-for-original-webkit-gradients and prefixed(-owg, $value) { list-style-image: -owg($value); }
117
+ @if $experimental-support-for-webkit and prefixed(-webkit, $value) { list-style-image: -webkit($value); }
118
+ @if $experimental-support-for-opera and prefixed(-o, $value) { list-style-image: -o($value); }
119
+ @if $experimental-support-for-svg and prefixed(-svg, $value) { list-style-image: -svg($value); }
120
+ list-style-image: $value ;
121
+ }
122
+
123
+ // content property support for vendor prefixing within values.
124
+ @mixin content($value) {
125
+ $value: -compass-list($value);
126
+ @if $experimental-support-for-mozilla and prefixed(-moz, $value) { content: -moz($value); }
127
+ @if $support-for-original-webkit-gradients and prefixed(-owg, $value) { content: -owg($value); }
128
+ @if $experimental-support-for-webkit and prefixed(-webkit, $value) { content: -webkit($value); }
129
+ @if $experimental-support-for-opera and prefixed(-o, $value) { content: -o($value); }
130
+ @if $experimental-support-for-svg and prefixed(-svg, $value) { content: -svg($value); }
131
+ content: $value ;
132
+ }