Skip to content

Instantly share code, notes, and snippets.

@timeinfeldt
Created August 11, 2014 13:07
Show Gist options
  • Select an option

  • Save timeinfeldt/fa6614496c6088283ba0 to your computer and use it in GitHub Desktop.

Select an option

Save timeinfeldt/fa6614496c6088283ba0 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.0.rc.1)
// ----
$map: (
'template/resize-arrows.png': 'HASHED_PATH',
'symbols/google-logo.png': 'ANOTHER_HASHED_PATH',
);
@function image-url($key) {
@return url(map-get($map, $key));
}
.some-element {
background: image-url('symbols/google-logo.png') center center no-repeat;
}
.other-element {
background: image-url('template/resize-arrows.png') no-repeat 0 0;
}
.some-element {
background: url("ANOTHER_HASHED_PATH") center center no-repeat;
}
.other-element {
background: url("HASHED_PATH") no-repeat 0 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment