This repository was archived by the owner on Nov 9, 2017. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +43
-3
lines changed Expand file tree Collapse file tree 3 files changed +43
-3
lines changed Original file line number Diff line number Diff line change 1
- base64-image
1
+ base64-background- image
2
2
============
3
3
4
4
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
+ ```
Original file line number Diff line number Diff line change 1
- @mixin base64-image-retina ($url ) {
1
+ @mixin base64-background-image ($url ) {
2
2
background-repeat : no-repeat ;
3
3
background-image : inline-image ($url + ' .svg' );
4
4
.no-svg & {
Original file line number Diff line number Diff line change 1
1
{
2
- "name" : " base64-image" ,
2
+ "name" : " base64-background- image" ,
3
3
"version" : " 1.0.0" ,
4
4
"homepage" : " https://github.com/markusfalk/base64-image" ,
5
5
"authors" : [
You can’t perform that action at this time.
0 commit comments