0

Salesforce has suggested we add the version number of slds into the static resource .zip file name. So when we use it in our page, it would be something like:

<apex:stylesheet value="{!URLFOR($Resource.SLDS213, 'assets/styles/salesforce-lightning-design-system-vf.css')}" />

I think Salesforce claims the slds code today will still be working under tomorrow's version only with the latest design. So it shouldn't be an issue if we upload a newer version and simply replace the old one. And when we need to keep the version number of slds, if we need to keep up with latest design, for every release, we will need to update all of our VF pages. So why do we want to do that.

3
  • Doesn't it revolve around caching? By having the version number in the name, if the resource is updated, there isn't a cached version that is being retrieved.
    – Nick C
    Commented Nov 7, 2016 at 4:43
  • @NickCook Using URLFOR would avoid the caching issue, actually, as it formats the resource to /resource/<timestamp>/resourcename/...
    – sfdcfox
    Commented Nov 7, 2016 at 4:58
  • 2
    Additions and depreciation happens frequently in the current version s of SLDS. At a minimum I would put the version in the description. Not sure if the overhead of putting it in the filename is worth it and would depend on how impactful the changes are from the version you are using to the newer version.
    – Eric
    Commented Nov 7, 2016 at 5:24

1 Answer 1

2

A better alternative for this is to use extends="force:slds" in our lightning applications. Firstly it will include the latest version of library and it would take away the hassles of developers updating the versions now and then.

Reference document : Extends force:slds

  • Communities templates & lightning experience have inbuild slds support.

And if we incorporate extends force:slds in our lightning applications we can keep up to date and be consistent with Lightning Design System enhancements.

Update :

Though these versions number will be of use when we use lightning design system in VF pages without lightning components. Hope Salesforce comes up with some tag similar to <apex:includeLightning /> to ease this use of being consistent with the lightning design library static resources in VF pages.

2
  • 1
    extends="force:slds" seems only works for lightning app, not VF pages IMO?
    – Lance Shi
    Commented Nov 7, 2016 at 4:51
  • Right ! I guess we will have to wait until we have a similar tag like <apex:includeLightning /> in the upcoming releases.
    – Sumuga
    Commented Nov 7, 2016 at 4:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .