Revert "Merge pull request #712 from Xananax/sprite_background_image"
This reverts commit0c208d58fa
, reversing changes made toc81af69c69
.
This commit is contained in:
parent
0c208d58fa
commit
bbdb179df1
@ -42,8 +42,7 @@ $<%= name %>-inline: false !default;
|
|||||||
}
|
}
|
||||||
} @else {
|
} @else {
|
||||||
#{$<%= name %>-sprite-base-class} {
|
#{$<%= name %>-sprite-base-class} {
|
||||||
background-image: $<%= name %>-sprites;
|
background: $<%= name %>-sprites no-repeat;
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//sass functions to return the dimensions of a sprite image as units
|
//sass functions to return the dimensions of a sprite image as units
|
||||||
@ -79,4 +78,4 @@ $<%= name %>-inline: false !default;
|
|||||||
// Generates a class for each sprited image.
|
// Generates a class for each sprited image.
|
||||||
@mixin all-<%= name %>-sprites($dimensions: $<%= name %>-sprite-dimensions, $prefix: sprite-map-name($<%= name %>-sprites), $offset-x: 0, $offset-y: 0) {
|
@mixin all-<%= name %>-sprites($dimensions: $<%= name %>-sprite-dimensions, $prefix: sprite-map-name($<%= name %>-sprites), $offset-x: 0, $offset-y: 0) {
|
||||||
@include <%= name %>-sprites(<%= sprite_names.join(" ") %>, $dimensions, $prefix, $offset-x, $offset-y);
|
@include <%= name %>-sprites(<%= sprite_names.join(" ") %>, $dimensions, $prefix, $offset-x, $offset-y);
|
||||||
}
|
}
|
@ -67,8 +67,7 @@ class SpritesTest < Test::Unit::TestCase
|
|||||||
SCSS
|
SCSS
|
||||||
assert_correct css, <<-CSS
|
assert_correct css, <<-CSS
|
||||||
.squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty {
|
.squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty {
|
||||||
background-image: url('/squares-sbbc18e2129.png');
|
background: url('/squares-sbbc18e2129.png') no-repeat;
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.squares-ten-by-ten {
|
.squares-ten-by-ten {
|
||||||
@ -99,8 +98,7 @@ class SpritesTest < Test::Unit::TestCase
|
|||||||
assert_not_nil Dir.glob("#{@generated_images_tmp_path}/squares-s*.png").first
|
assert_not_nil Dir.glob("#{@generated_images_tmp_path}/squares-s*.png").first
|
||||||
assert_correct <<-CSS, css
|
assert_correct <<-CSS, css
|
||||||
.squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty {
|
.squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty {
|
||||||
background-image: url('/images/generated/squares-sbbc18e2129.png');
|
background: url('/images/generated/squares-sbbc18e2129.png') no-repeat;
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.squares-ten-by-ten {
|
.squares-ten-by-ten {
|
||||||
@ -121,8 +119,7 @@ class SpritesTest < Test::Unit::TestCase
|
|||||||
SCSS
|
SCSS
|
||||||
assert_correct css, <<-CSS
|
assert_correct css, <<-CSS
|
||||||
.squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty {
|
.squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty {
|
||||||
background-image: url('/squares-sbbc18e2129.png');
|
background: url('/squares-sbbc18e2129.png') no-repeat;
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.squares-ten-by-ten {
|
.squares-ten-by-ten {
|
||||||
@ -154,8 +151,7 @@ class SpritesTest < Test::Unit::TestCase
|
|||||||
SCSS
|
SCSS
|
||||||
assert_correct css, <<-CSS
|
assert_correct css, <<-CSS
|
||||||
.squares-sprite, .cubicle, .large-cube {
|
.squares-sprite, .cubicle, .large-cube {
|
||||||
background-image: url('/squares-sbbc18e2129.png');
|
background: url('/squares-sbbc18e2129.png') no-repeat;
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.cubicle {
|
.cubicle {
|
||||||
@ -180,8 +176,7 @@ class SpritesTest < Test::Unit::TestCase
|
|||||||
SCSS
|
SCSS
|
||||||
assert_correct css, <<-CSS
|
assert_correct css, <<-CSS
|
||||||
.circles {
|
.circles {
|
||||||
background-image: url('/squares-sbbc18e2129.png');
|
background: url('/squares-sbbc18e2129.png') no-repeat;
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
}
|
||||||
CSS
|
CSS
|
||||||
assert_equal image_size('squares-s*.png'), [20, 30]
|
assert_equal image_size('squares-s*.png'), [20, 30]
|
||||||
@ -195,8 +190,7 @@ class SpritesTest < Test::Unit::TestCase
|
|||||||
SCSS
|
SCSS
|
||||||
assert_correct css, <<-CSS
|
assert_correct css, <<-CSS
|
||||||
.squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty {
|
.squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty {
|
||||||
background-image: url('/squares-s563a5e0855.png');
|
background: url('/squares-s563a5e0855.png') no-repeat;
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.squares-ten-by-ten {
|
.squares-ten-by-ten {
|
||||||
@ -218,8 +212,7 @@ class SpritesTest < Test::Unit::TestCase
|
|||||||
SCSS
|
SCSS
|
||||||
assert_correct css, <<-CSS
|
assert_correct css, <<-CSS
|
||||||
.squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty {
|
.squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty {
|
||||||
background-image: url('/squares-s4ea353fa6d.png');
|
background: url('/squares-s4ea353fa6d.png') no-repeat;
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.squares-ten-by-ten {
|
.squares-ten-by-ten {
|
||||||
@ -242,8 +235,7 @@ class SpritesTest < Test::Unit::TestCase
|
|||||||
SCSS
|
SCSS
|
||||||
assert_correct css, <<-CSS
|
assert_correct css, <<-CSS
|
||||||
.squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty {
|
.squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty {
|
||||||
background-image: url('/squares-sf4771cb124.png');
|
background: url('/squares-sf4771cb124.png') no-repeat;
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.squares-ten-by-ten {
|
.squares-ten-by-ten {
|
||||||
@ -266,8 +258,7 @@ class SpritesTest < Test::Unit::TestCase
|
|||||||
SCSS
|
SCSS
|
||||||
assert_correct css, <<-CSS
|
assert_correct css, <<-CSS
|
||||||
.squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty {
|
.squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty {
|
||||||
background-image: url('/squares-sc82d6f3cf4.png');
|
background: url('/squares-sc82d6f3cf4.png') no-repeat;
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.squares-ten-by-ten {
|
.squares-ten-by-ten {
|
||||||
@ -289,8 +280,7 @@ class SpritesTest < Test::Unit::TestCase
|
|||||||
SCSS
|
SCSS
|
||||||
assert_correct css, <<-CSS
|
assert_correct css, <<-CSS
|
||||||
.squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty {
|
.squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty {
|
||||||
background-image: url('/squares-s2f4aa65dcf.png');
|
background: url('/squares-s2f4aa65dcf.png') no-repeat;
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.squares-ten-by-ten {
|
.squares-ten-by-ten {
|
||||||
@ -308,8 +298,7 @@ class SpritesTest < Test::Unit::TestCase
|
|||||||
css = render <<-SCSS
|
css = render <<-SCSS
|
||||||
$squares: sprite-map("squares/*.png", $position: 100%);
|
$squares: sprite-map("squares/*.png", $position: 100%);
|
||||||
.squares-sprite {
|
.squares-sprite {
|
||||||
background-image: $squares;
|
background: $squares no-repeat;
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.adjusted-percentage {
|
.adjusted-percentage {
|
||||||
@ -326,8 +315,7 @@ class SpritesTest < Test::Unit::TestCase
|
|||||||
SCSS
|
SCSS
|
||||||
assert_correct css, <<-CSS
|
assert_correct css, <<-CSS
|
||||||
.squares-sprite {
|
.squares-sprite {
|
||||||
background-image: url('/squares-sce5dc30797.png');
|
background: url('/squares-sce5dc30797.png') no-repeat;
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.adjusted-percentage {
|
.adjusted-percentage {
|
||||||
@ -365,8 +353,7 @@ class SpritesTest < Test::Unit::TestCase
|
|||||||
SCSS
|
SCSS
|
||||||
assert_correct css, <<-CSS
|
assert_correct css, <<-CSS
|
||||||
.squares-sprite, .adjusted-percentage, .adjusted-px-1, .adjusted-px-2 {
|
.squares-sprite, .adjusted-percentage, .adjusted-px-1, .adjusted-px-2 {
|
||||||
background-image: url('/squares-sce5dc30797.png');
|
background: url('/squares-sce5dc30797.png') no-repeat;
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.adjusted-percentage {
|
.adjusted-percentage {
|
||||||
@ -393,8 +380,7 @@ class SpritesTest < Test::Unit::TestCase
|
|||||||
SCSS
|
SCSS
|
||||||
assert_correct css, <<-CSS
|
assert_correct css, <<-CSS
|
||||||
.squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty {
|
.squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty {
|
||||||
background-image: url('/squares-s65c43cd573.png');
|
background: url('/squares-s65c43cd573.png') no-repeat;
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.squares-ten-by-ten {
|
.squares-ten-by-ten {
|
||||||
@ -418,8 +404,7 @@ class SpritesTest < Test::Unit::TestCase
|
|||||||
SCSS
|
SCSS
|
||||||
assert_correct css, <<-CSS
|
assert_correct css, <<-CSS
|
||||||
.squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty {
|
.squares-sprite, .squares-ten-by-ten, .squares-twenty-by-twenty {
|
||||||
background-image: url('/squares-sb9d9a8ca6a.png');
|
background: url('/squares-sb9d9a8ca6a.png') no-repeat;
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.squares-ten-by-ten {
|
.squares-ten-by-ten {
|
||||||
@ -438,16 +423,14 @@ class SpritesTest < Test::Unit::TestCase
|
|||||||
assert_raise(Sass::SyntaxError) do
|
assert_raise(Sass::SyntaxError) do
|
||||||
render <<-SCSS
|
render <<-SCSS
|
||||||
.squares {
|
.squares {
|
||||||
background-image: sprite-url("squares/*.png");
|
background: sprite-url("squares/*.png") no-repeat;
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
}
|
||||||
SCSS
|
SCSS
|
||||||
end
|
end
|
||||||
assert_raise(Sass::SyntaxError) do
|
assert_raise(Sass::SyntaxError) do
|
||||||
css = render <<-SCSS
|
css = render <<-SCSS
|
||||||
.squares {
|
.squares {
|
||||||
background-image: sprite-image("squares/twenty-by-twenty.png");
|
background: sprite-image("squares/twenty-by-twenty.png") no-repeat;
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
}
|
||||||
SCSS
|
SCSS
|
||||||
end
|
end
|
||||||
@ -456,8 +439,7 @@ class SpritesTest < Test::Unit::TestCase
|
|||||||
@import "squares/*.png";
|
@import "squares/*.png";
|
||||||
|
|
||||||
.squares {
|
.squares {
|
||||||
background-image: sprite-position("squares/twenty-by-twenty.png");
|
background: sprite-position("squares/twenty-by-twenty.png") no-repeat;
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
}
|
||||||
SCSS
|
SCSS
|
||||||
end
|
end
|
||||||
@ -466,15 +448,12 @@ class SpritesTest < Test::Unit::TestCase
|
|||||||
it "should work even if @import is missing" do
|
it "should work even if @import is missing" do
|
||||||
css = render <<-SCSS
|
css = render <<-SCSS
|
||||||
.squares {
|
.squares {
|
||||||
background-image: sprite(sprite-map("squares/*.png"), twenty-by-twenty);
|
background: sprite(sprite-map("squares/*.png"), twenty-by-twenty) no-repeat;
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
}
|
||||||
SCSS
|
SCSS
|
||||||
assert_correct css, <<-CSS
|
assert_correct css, <<-CSS
|
||||||
.squares {
|
.squares {
|
||||||
background-image: url('/squares-sd817b59156.png');
|
background: url('/squares-sd817b59156.png') 0 -10px no-repeat;
|
||||||
background-position: 0 -10px;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
}
|
||||||
CSS
|
CSS
|
||||||
end
|
end
|
||||||
@ -493,8 +472,7 @@ class SpritesTest < Test::Unit::TestCase
|
|||||||
assert_equal image_size('squares-s*.png'), [20, 40]
|
assert_equal image_size('squares-s*.png'), [20, 40]
|
||||||
assert_correct css, <<-CSS
|
assert_correct css, <<-CSS
|
||||||
.squares-sprite {
|
.squares-sprite {
|
||||||
background-image: url('/squares-s555875d730.png');
|
background: url('/squares-s555875d730.png') no-repeat;
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.foo {
|
.foo {
|
||||||
@ -514,8 +492,7 @@ class SpritesTest < Test::Unit::TestCase
|
|||||||
SCSS
|
SCSS
|
||||||
assert_correct css, <<-CSS
|
assert_correct css, <<-CSS
|
||||||
.selectors-sprite, .selectors-ten-by-ten {
|
.selectors-sprite, .selectors-ten-by-ten {
|
||||||
background-image: url('/selectors-s7e84acb3d2.png');
|
background: url('/selectors-s7e84acb3d2.png') no-repeat;
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.selectors-ten-by-ten {
|
.selectors-ten-by-ten {
|
||||||
@ -540,8 +517,7 @@ class SpritesTest < Test::Unit::TestCase
|
|||||||
SCSS
|
SCSS
|
||||||
assert_correct css, <<-CSS
|
assert_correct css, <<-CSS
|
||||||
.selectors-sprite, .selectors-ten-by-ten {
|
.selectors-sprite, .selectors-ten-by-ten {
|
||||||
background-image: url('/selectors-s7e84acb3d2.png');
|
background: url('/selectors-s7e84acb3d2.png') no-repeat;
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.selectors-ten-by-ten {
|
.selectors-ten-by-ten {
|
||||||
@ -568,8 +544,7 @@ class SpritesTest < Test::Unit::TestCase
|
|||||||
SCSS
|
SCSS
|
||||||
assert_correct css, <<-CSS
|
assert_correct css, <<-CSS
|
||||||
.selectors-sprite, a {
|
.selectors-sprite, a {
|
||||||
background-image: url('/selectors-s7e84acb3d2.png');
|
background: url('/selectors-s7e84acb3d2.png') no-repeat;
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
@ -598,8 +573,7 @@ class SpritesTest < Test::Unit::TestCase
|
|||||||
SCSS
|
SCSS
|
||||||
assert_correct css, <<-CSS
|
assert_correct css, <<-CSS
|
||||||
.selectors-sprite, a {
|
.selectors-sprite, a {
|
||||||
background-image: url('/selectors-s7e84acb3d2.png')
|
background: url('/selectors-s7e84acb3d2.png') no-repeat;
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
@ -617,8 +591,7 @@ class SpritesTest < Test::Unit::TestCase
|
|||||||
SCSS
|
SCSS
|
||||||
assert_correct css, <<-CSS
|
assert_correct css, <<-CSS
|
||||||
.selectors-sprite, a {
|
.selectors-sprite, a {
|
||||||
background-image: url('/selectors-s7e84acb3d2.png')
|
background: url('/selectors-s7e84acb3d2.png') no-repeat;
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
@ -655,8 +628,7 @@ class SpritesTest < Test::Unit::TestCase
|
|||||||
SCSS
|
SCSS
|
||||||
assert_correct css, <<-CSS
|
assert_correct css, <<-CSS
|
||||||
.ko-sprite, .ko-default_background, .ko-starbg26x27 {
|
.ko-sprite, .ko-default_background, .ko-starbg26x27 {
|
||||||
background-image: url('/ko-sd46dfbab4f.png')
|
background: url('/ko-sd46dfbab4f.png') no-repeat;
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.ko-default_background {
|
.ko-default_background {
|
||||||
@ -727,8 +699,7 @@ class SpritesTest < Test::Unit::TestCase
|
|||||||
SCSS
|
SCSS
|
||||||
assert_correct css, <<-CSS
|
assert_correct css, <<-CSS
|
||||||
.nested-sprite, .nested-ten-by-ten {
|
.nested-sprite, .nested-ten-by-ten {
|
||||||
background-image: url('/nested-s7b93e0b6bf.png');
|
background: url('/nested-s7b93e0b6bf.png') no-repeat;
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.nested-ten-by-ten {
|
.nested-ten-by-ten {
|
||||||
@ -751,8 +722,7 @@ class SpritesTest < Test::Unit::TestCase
|
|||||||
assert_equal [30, 20], image_size('squares-s*.png')
|
assert_equal [30, 20], image_size('squares-s*.png')
|
||||||
other_css = <<-CSS
|
other_css = <<-CSS
|
||||||
.squares-sprite {
|
.squares-sprite {
|
||||||
background-image: url('/squares-s4bd95c5c56.png');
|
background: url('/squares-s4bd95c5c56.png') no-repeat;
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.foo {
|
.foo {
|
||||||
@ -778,8 +748,7 @@ class SpritesTest < Test::Unit::TestCase
|
|||||||
SCSS
|
SCSS
|
||||||
other_css = <<-CSS
|
other_css = <<-CSS
|
||||||
.squares-sprite {
|
.squares-sprite {
|
||||||
background-image: url('/squares-sbbc18e2129.png');
|
background: url('/squares-sbbc18e2129.png') no-repeat;
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
}
|
||||||
.div {
|
.div {
|
||||||
height:21px;
|
height:21px;
|
||||||
@ -801,8 +770,7 @@ class SpritesTest < Test::Unit::TestCase
|
|||||||
SCSS
|
SCSS
|
||||||
other_css = <<-CSS
|
other_css = <<-CSS
|
||||||
.colors-sprite {
|
.colors-sprite {
|
||||||
background-image:url('/colors-s58671cb5bb.png');
|
background:url('/colors-s58671cb5bb.png') no-repeat;
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
}
|
||||||
.blue {
|
.blue {
|
||||||
text-indent:-119988px;
|
text-indent:-119988px;
|
||||||
|
Loading…
Reference in New Issue
Block a user