css - FontAwesome - Icons showing as a box - using Compass without rails -
my font-awesome icons show box, means icons aren't loading, in html have as:
<i class="fa fa-home"></i> i've checked font-awesome-sass has installed, properly: see in console have:
font-awesome-sass (4.3.2.1) here's config.rb
require "susy" require 'font-awesome-sass' css_dir = '_/css' sass_dir = '_/components/sass' javascripts_dir = '_/js' output_style = :compressed styles.scss
@import 'compass'; @import 'compass/reset'; @import 'susy'; @import "font-awesome-compass"; @import "font-awesome"; @import 'variables'; @import 'mixins'; @import 'base'; @import 'layout'; @modules 'modules'; is there step missed? because unsure of do.
error message browser:
downloadable font: download failed (font-family: "fontawesome" style:normal weight:normal stretch:normal src index:2): status=2147500037 source: file:///fonts/font-awesome/fontawesome-webfont.woff styles.css downloadable font: download failed (font-family: "fontawesome" style:normal weight:normal stretch:normal src index:3): status=2147500037 source: file:///fonts/font-awesome/fontawesome-webfont.ttf styles.css downloadable font: no supported format found (font-family: "fontawesome" style:normal weight:normal stretch:normal src index:5) source: (end of source list)
just solved similar issue having , want share solution. without seeing directory structure hard sure if fix problem.
my hunch issue, mine, scss variable $fa-font-path found in font-awsome/scss/_variables.scss not correctly referencing path font directory. set default ../../fonts, in case incorrect. important note path relative compiled css directory.
my directory structure looks this:
-cdn l-css l-fonts l-font-awesome.woff l-font-awesome.woff2 l-font-awesome.ttf l-*other font-awesome files l- scripts -node_modules l-font-awesome -_scss l-screen.scss in screen.scss import font awesome: @import "../node_modules/font-awesome/scss/font-awesome";(using full path illustrate location. should able left @import "font-awesome" since node module).
then set variable in screen.scss after override default set in node_modules/font-awesome/scss/_variables.scss $fa-font-path: "../fonts" !default; , . prevents variable getting reset on further npm install's.
hope can others similar issues!
Comments
Post a Comment