Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Font path variable #4

Open
ghost opened this issue Feb 23, 2017 · 1 comment
Open

[Feature Request] Font path variable #4

ghost opened this issue Feb 23, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented Feb 23, 2017

Providing a font path variable would resolve common issues such as noted here: https://github.com/webpack-contrib/sass-loader#problems-with-url. As described, "bootstrap-sass for example has an $icon-font-path".

@ghost
Copy link
Author

ghost commented Feb 24, 2017

The resulting sass should be:

// var.scss
$font-path: 'fonts/' !default;
// icon.scss
@font-face {
    font-family: 'element-icons';
    src: url('#{$font-path}element-icons.eot?t=1472440741'); /* IE9*/
    src: url('#{$font-path}element-icons.woff?t=1472440741') format('woff'), /* chrome, firefox */
      url('#{$font-path}element-icons.ttf?t=1472440741') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
      url('#{$font-path}element-icons.svg?t=1472440741#el-icon') format('svg'); /* iOS 4.1- */
    font-weight: 400;
    font-style: normal;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant