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

Commit 40e1f46

Browse files
author
Markus Falk
committed
[Task] bump version with docs
1 parent ea55f37 commit 40e1f46

File tree

2 files changed

+25
-4
lines changed

2 files changed

+25
-4
lines changed

README.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,53 @@ Usage Example
77
-------------
88

99
```scss
10-
// somewhere in your base
10+
// fallback png has same name as svg icon
1111
%icon {
1212
@include base64-background-image("icon");
1313
}
1414

15-
// extend the placeholder
15+
// you want to use an alternating png as fallback
16+
%icon2 {
17+
@include base64-background-image("icon2", "alternating-icon-2");
18+
}
19+
20+
21+
// extend the placeholders
1622
.ico {
17-
@extend %disruption-orange;
23+
@extend %icon;
24+
}
25+
26+
.ico2 {
27+
@extend %icon2;
1828
}
1929
```
2030

2131
Generates
2232

2333
```css
34+
/* default with same-name fallback image */
2435
.ico {
2536
background-image: url('data:image/svg+xml;base64,ABC...');
2637
background-repeat: no-repeat;
2738
}
2839
.no-svg .ico {
2940
background-image: url('icon.png');
3041
}
42+
43+
/* default with different fallback image */
44+
.ico2 {
45+
background-image: url('data:image/svg+xml;base64,ABC...');
46+
background-repeat: no-repeat;
47+
}
48+
.no-svg .ico2 {
49+
background-image: url('alternating-icon-2.png');
50+
}
3151
```
3252

3353
Requirements
3454
------------
3555

56+
* SVG feature detection with class: 'no-svg'
3657
* Compass
3758
* SASS
3859

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "base64-background-image",
3-
"version": "1.0.1",
3+
"version": "1.1.0",
44
"homepage": "https://github.com/markusfalk/base64-image",
55
"authors": [
66
"Markus Falk <[email protected]>"

0 commit comments

Comments
 (0)