0

I have uploaded the Salesforce Sans font as satic resource in my dev org.

enter image description here

How to use this sytle in my lightning component.

<lightning:layout multipleRows="true">
    <lightning:layoutItem size="12" mediumDeviceSize="5" class="border">
        <div class="slds-box" style="font-family:sans-serif;">
            My first Lightning componet
        </div>
    </lightning:layoutItem>
</lightning:layout>

Please help me out !!

0

Add a custom css class instead of your inline style (eg. customFont).

<p class="customFont"> TEST </p>

In your css file add the following:

customFont.THIS {
    font-family: 'customSalesforceFont';
    font-size: 1.2rem;
}
@font-face {
   font-family: 'customSalesforceFont';
   src: url(/resource/SalesforceSans-Book); 
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.