Skip to content
This repository was archived by the owner on Feb 24, 2021. It is now read-only.

Icons are broken #8

Closed
adilold opened this issue Aug 3, 2017 · 5 comments
Closed

Icons are broken #8

adilold opened this issue Aug 3, 2017 · 5 comments
Assignees

Comments

@adilold
Copy link

adilold commented Aug 3, 2017

The icon font in shins is not loaded correctly
image

I tried copying the font files into my pub folder but that yielded no results. Any ideas?

Thanks

@MikeRalphson MikeRalphson self-assigned this Aug 3, 2017
@MikeRalphson
Copy link
Contributor

MikeRalphson commented Aug 3, 2017

Thanks for reporting! Hmm, I'm seeing CSS errors in Firefox

Error in parsing value for 'src'. Skipped to next declaration. screen.css:392:7
Error in parsing value for 'src'. Skipped to next declaration. screen.css:393:7

The slate screen.scss doesn't seem to be being built correctly by node-sass.

Have tried updating the node-sass dependency...

@MikeRalphson
Copy link
Contributor

MikeRalphson commented Aug 3, 2017

@font-face {
  font-family: 'slate';
  src:font-url('slate.eot?-syv14m');
  src:font-url('slate.eot?#iefix-syv14m') format('embedded-opentype'),
    font-url('slate.woff2?-syv14m') format('woff2'),
    font-url('slate.woff?-syv14m') format('woff'),
    font-url('slate.ttf?-syv14m') format('truetype'),
    font-url('slate.svg?-syv14m#slate') format('svg');
  font-weight: normal;
  font-style: normal;
}

is getting compiled to

@font-face {
  font-family: 'slate';
  src: font-url("slate.eot?-syv14m");
  src: font-url("slate.eot?#iefix-syv14m") format("embedded-opentype"), font-url("slate.woff2?-syv14m") format("woff2"), font-url("slate.woff?-syv14m") format("woff"), font-url("slate.ttf?-syv14m") format("truetype"), font-url("slate.svg?-syv14m#slate") format("svg");
  font-weight: normal;
  font-style: normal; }

Whereas slate has

@font-face{font-family:'slate';
src:url(../fonts/slate.eot?-syv14m);src:url(../fonts/slate.eot?#iefix-syv14m) format("embedded-opentype"),url(../fonts/slate.woff2?-syv14m) format("woff2"),url(../fonts/slate.woff?-syv14m) format("woff"),url(../fonts/slate.ttf?-syv14m) format("truetype"),url(../fonts/slate.svg?-syv14m#slate) format("svg");font-weight:normal;font-style:normal}

@MikeRalphson
Copy link
Contributor

MikeRalphson commented Aug 4, 2017

Thanks again for reporting this @adilhz - I had seen it a couple of times and never dug into why it was happening.

It turns out node-sass (which compiles the sccs files to css) doesn't natively support the font-url helper function, but there is an add-on module node-sass-asset-functions which provides this.

nb fonts will be loaded directly from the source/fonts directory, and buildstyle has changed from being a script to being a javascript program.

This is working for me now on github pages (https://mermade.github.io/shins), so I will cut a new release.

@MikeRalphson
Copy link
Contributor

Should be fixed in v2.0.1-0 but please let me know if not.

@adilold
Copy link
Author

adilold commented Aug 4, 2017

Can confirm the icons are working. Thanks for the support!

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

No branches or pull requests

2 participants