Skip to main content

#SLDS Styles1 discutindo

Applying SLDS styles on Lightning App Page(a.k.a flexipage) to a ReactJS container application:

 

In-short: what is the equivalent of this visualforce page solution in Lightning Page(flexipage created from Lightning App Builder)

 

Visualforce way(working):

<apex:page>

  <!-- Imports the SLDS styles with 'slds-scope' automatically  -->

  <apex:slds />

    <!-- REQUIRED SLDS WRAPPER -->

    <div class="slds-scope">

 

If you are already thinking of SLDS styles load automatically. My use case is bit different. I would need slds_* class to apply in my ReactJS(that uses slds lightning components) App embedded from <lightning:container src="MyStaticResource + /index.html" />

 

Again(though it works) I DO NOT WANT to deal with downloading slds.min.css custom scope'd from here and upload to static resource etc. for two reasons. i) I would like to keep my ReactJS dist bundle smaller ii) To avoid another manual step  - https://tools.lightningdesignsystem.com/css-customizer

 

Appreciate any suggestion. Thanks!

<apex:slds />

0/9000