Skip to content

Commit 87e8e54

Browse files
committed
added mincer font/image helpers #551
1 parent edc3b0f commit 87e8e54

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed
+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11

22
/*
33
*= require require_all
4-
*/
4+
*/
5+

test/dummy_node_mincer/require_all.css.ejs.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55

66
#image-retina {
77
@include img-retina("apple-touch-icon-144-precomposed.png", "apple-touch-icon-144-precomposed.png", 72px, 72px);
8-
}
8+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
@function twbs-font-path ($path) {
3+
// do something like following
4+
// from "path/to/font.ext#suffix" to "<%- asset_path(path/to/font.ext)) + #suffix %>"
5+
// from "path/to/font.ext?#suffix" to "<%- asset_path(path/to/font.ext)) + ?#suffix %>"
6+
// or from "path/to/font.ext" just "<%- asset_path(path/to/font.ext)) %>"
7+
@return "<%- asset_path('#{$path}'.replace(/[#?].*$/, '')) + '#{$path}'.replace(/(^[^#?]*)([#?]?.*$)/, '$2') %>";
8+
}
9+
10+
@function twbs-image-path ($file) {
11+
@return "<%- asset_path('#{$file}') %>";
12+
}

0 commit comments

Comments
 (0)