~ubuntu-branches/ubuntu/vivid/horizon/vivid-updates

« back to all changes in this revision

Viewing changes to pkg/bootstrap_scss/data/scss/_bootstrap-mincer.scss

  • Committer: Package Import Robot
  • Author(s): Corey Bryant
  • Date: 2015-04-30 15:46:00 UTC
  • mto: (87.1.1 vivid-proposed) (0.15.1)
  • mto: This revision was merged to the branch mainline in revision 87.
  • Revision ID: package-import@ubuntu.com-20150430154600-1zms8pm8yccw8n1h
Tags: upstream-2015.1.0/xstatic
Import upstream version 2015.1.0, component xstatic

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Mincer asset helper functions
 
2
//
 
3
// This must be imported into a .css.ejs.scss file.
 
4
// Then, <% %>-interpolations will be parsed as strings by Sass, and evaluated by EJS after Sass compilation.
 
5
 
 
6
 
 
7
@function twbs-font-path($path) {
 
8
  // do something like following
 
9
  // from "path/to/font.ext#suffix" to "<%- asset_path(path/to/font.ext)) + #suffix %>"
 
10
  // from "path/to/font.ext?#suffix" to "<%- asset_path(path/to/font.ext)) + ?#suffix %>"
 
11
  // or from "path/to/font.ext" just "<%- asset_path(path/to/font.ext)) %>"
 
12
  @return "<%- asset_path('#{$path}'.replace(/[#?].*$/, '')) + '#{$path}'.replace(/(^[^#?]*)([#?]?.*$)/, '$2') %>";
 
13
}
 
14
 
 
15
@function twbs-image-path($file) {
 
16
  @return "<%- asset_path('#{$file}') %>";
 
17
}