compass_sumo 0.2.0 → 0.3.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.
Binary file
|
data/lib/compass_sumo/version.rb
CHANGED
@@ -0,0 +1,41 @@
|
|
1
|
+
// Fallback mixin. Allows you to define a simple fallback for the current class, with the exact scoping.
|
2
|
+
// A small example:
|
3
|
+
// nav ul li {
|
4
|
+
// left: 25px;
|
5
|
+
//
|
6
|
+
// @include fallback('ie8') {
|
7
|
+
// left: 28px;
|
8
|
+
// }
|
9
|
+
//
|
10
|
+
// will generate
|
11
|
+
// nav ul li { left: 25px; }
|
12
|
+
// .ie8 nav ul li { left: 28px; }
|
13
|
+
@mixin fallback($fallbackClass) {
|
14
|
+
.#{$fallbackClass} & {
|
15
|
+
@content;
|
16
|
+
}
|
17
|
+
}
|
18
|
+
|
19
|
+
$defaultSvgFallbackClass: 'no-svg' !default;
|
20
|
+
|
21
|
+
// Setup a SVG background with PNG fallback
|
22
|
+
@mixin svg-with-png-fallback($name, $backgroundOptions: nulll,
|
23
|
+
$svgImage: null,
|
24
|
+
$pngImage: null,
|
25
|
+
$fallbackClass: $defaultSvgFallbackClass,
|
26
|
+
$inline: true
|
27
|
+
) {
|
28
|
+
|
29
|
+
$svgImage: "#{$name}.svg" !default;
|
30
|
+
$pngImage: "#{$name}.png" !default;
|
31
|
+
|
32
|
+
@if ($inline) {
|
33
|
+
@include background(inline-image($svgImage) #{$backgroundOptions});
|
34
|
+
} @else {
|
35
|
+
@include background(image-url($svgImage) #{$backgroundOptions});
|
36
|
+
}
|
37
|
+
|
38
|
+
@include fallback($fallbackClass) {
|
39
|
+
@include background(image-url($pngImage) #{$backgroundOptions})
|
40
|
+
}
|
41
|
+
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: compass_sumo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2013-
|
14
|
+
date: 2013-03-14 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: compass
|
@@ -36,6 +36,7 @@ extensions: []
|
|
36
36
|
extra_rdoc_files: []
|
37
37
|
files:
|
38
38
|
- README.md
|
39
|
+
- compass_sumo-0.2.0.gem
|
39
40
|
- compass_sumo.gemspec
|
40
41
|
- lib/compass_sumo.rb
|
41
42
|
- lib/compass_sumo/engine.rb
|
@@ -45,6 +46,7 @@ files:
|
|
45
46
|
- stylesheets/_compass_sumo.scss
|
46
47
|
- stylesheets/compass_sumo/_mixins.scss
|
47
48
|
- stylesheets/compass_sumo/mixins/_animations.scss
|
49
|
+
- stylesheets/compass_sumo/mixins/_fallbacks.scss
|
48
50
|
- stylesheets/compass_sumo/mixins/_load_font.scss
|
49
51
|
- stylesheets/compass_sumo/mixins/_retina_sprites.scss
|
50
52
|
homepage:
|