By Softlanding
Share

SharePoint Online - Enabling the Client-Side Theming Engine

September 27, 2017

On Feb 24, 2016, Microsoft announced a new client-side theming engine for first release users. This new feature reduces the steps and time needed to apply custom themes. This speeds up development and introduces some unique use cases like client-defined theming or theming to match some dynamic event. Compare this with the old style theming engine where annotated CSS styles are compiled after using "Settings > Change the look" and remain static until the next manual theme change. 

Using server-side theming: 

  1. ​​Put custom CSS with annotations into the /Style Library/Themable/ or /Style Library/[locale]/Themable/ folder
  2. Go to Site settings > Change to look > Current > Try it out and apply
  3. Wait a few minutes
  4. Done

More info here.

Using client-side theming: 

  1. Put your custom CSS anywhere, or download it dynamically using a script (user-defined themes, anyone?)
  2. Create the CSS link and register it
  3. Done, no waiting needed!

The Microsoft announcement here appears to be dead, so see Elio's post here on details how to check if you have client-side theming enabled and how to dynamically register your CSS. Also, see this post on three ways how to use your custom CSS with the engine. 

To enable the client-side theming engine, you need to enable First Release. In O365, go to:

  1. Click on the Waffle icon > Admin 
  2. Click on Go to the old admin center
  3. Under SERVICE SETTINGS, click on Updates 
  4. Enable First Release for entire organization (or select for some people only)
  5. Wait 24-48 hours

In SharePoint Online, run the following function: 

SPThemeUtils.UseClientSideTheming()

If it returns true, then client-side theming is enabled and you're good to go!

Loading Conversation