TransWikia.com

SRC reference inside lightning components

Salesforce Asked by Nick Kahn on October 4, 2021

Here is the css reference, I have uploaded the font to the static resource, the source org showing up the correct font face but once I package the app (yes I included the static resource) to the package and installed in a new org the font-family is not showing correctly.

@font-face {
    font-family: Neutraface;
    src: url(/resource/fontNeutraface);  
}

Any help?

error I see in the console log:

downloadable font: download failed (font-family: "Neutraface"
style:normal weight:400 stretch:100 src index:0): status=2147746065
source:
https://xxxxx-dev-ed.lightning.force.com/resource/fontNeutraface

One Answer

As Mohith Shrivastava pointed out it was namespace that was causing the issue:

Here is how I was able to fixed:

src: url(/resource/namespace__fontNeutraface); 

Answered by Nick Kahn on October 4, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP