Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 9eb688f

Browse files
author
Markus Falk
committed
[Task] docs
1 parent 36f48ac commit 9eb688f

File tree

3 files changed

+43
-3
lines changed

3 files changed

+43
-3
lines changed

README.md

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,44 @@
1-
base64-image
1+
base64-background-image
22
============
33

44
scss mixin for creating svg base64 background-image width png fallback
5+
6+
Usage Example
7+
-------------
8+
9+
```scss
10+
// somewhere in your base
11+
%icon {
12+
@include base64-background-image("icon");
13+
}
14+
15+
// extend the placeholder
16+
.ico {
17+
@extend %disruption-orange;
18+
}
19+
```
20+
21+
Generates
22+
23+
```css
24+
.ico {
25+
background-image: url('data:image/svg+xml;base64,ABC...');
26+
background-repeat: no-repeat;
27+
}
28+
.no-svg .ico {
29+
background-image: url('icon.png');
30+
}
31+
```
32+
33+
Requirements
34+
------------
35+
36+
* Compass
37+
* SASS
38+
39+
Installation
40+
------------
41+
42+
```bash
43+
bower install markusfalk/base64-background-image
44+
```

_base64-image.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@mixin base64-image-retina($url) {
1+
@mixin base64-background-image($url) {
22
background-repeat: no-repeat;
33
background-image: inline-image($url + '.svg');
44
.no-svg & {

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "base64-image",
2+
"name": "base64-background-image",
33
"version": "1.0.0",
44
"homepage": "https://github.com/markusfalk/base64-image",
55
"authors": [

0 commit comments

Comments
 (0)