Another sprite example, this one uses the generated mixins.

This commit is contained in:
Chris Eppstein 2010-12-19 20:20:18 -08:00
parent 1818957131
commit 6c7b20764a
11 changed files with 31 additions and 2 deletions

View File

@ -5,3 +5,4 @@ sass_dir = "src"
images_dir = "images"
output_style = :compact
relative_assets = true
line_comments = false

View File

@ -1 +1,2 @@
flag-*.png
emblem-*.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -21,3 +21,17 @@
%td.tw
%td.rs
%td.gb
%h1 Emblems
%table#emblems
%tr
%td.favorite
%td.important
%td.photos
%tr
%td.readonly
%td.symbolic-link
%td.system
%tr
%td.unreadable
%td
%td

View File

@ -1,5 +1,5 @@
$flag-position: 2px;
@import "flag/*.png";
@import "emblem/*.png";
.flag-sprite {
width: image-width("flag/us.png");
@ -7,6 +7,19 @@ $flag-position: 2px;
padding: 0;
}
#flags {
@include sprites($flag-sprites, us de ca au cn cz nz jp scotland tw rs gb, $flag-sprite-base-class, $prefix: false);
.emblem-sprite {
width: image-width("emblem/favorite.png");
height: image-height("emblem/favorite.png");
padding: 0;
}
#flags {
@include sprites($flag-sprites,
us de ca au cn cz nz jp scotland tw rs gb,
$flag-sprite-base-class,
$prefix: false);
}
#emblems {
@include all-emblem-sprites($prefix: false);
}