SharePoint Online App part cannot inherit the site theme #1793
Expected or Desired Behavior
We develop a custom SharePoint Online App part. Following the guide https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/give-your-provider-hosted-add-in-the-sharepoint-look-and-feel,
The app part worked fine before. But recently since a few days ago, the app part does not inherit the site theme color, but uses the default blue color.
Steps to Reproduce
Customized a site to a non-default theme with a non-default color. Add a custom app with the inherited theme. You can see the custom app cannot inherit the site theme color, but the default blue color.
Thanks for your contribution! Sharing is caring.
The text was updated successfully, but these errors were encountered:
Same issue. here :( Came up during a sales demo where we were trying to sell SharePoint Online along with our add-ins. We already needed to work around a bug in the help icon handling for the Chrome component earlier in the year. Now the colors aren't coming in right, but instead sticking to Default blue.
I've come up with a workaround to this issue for anyone interested. We've created a server-side class called ThemeHelper which can correctly download the SharePoint Online themes on the server-side. We can then dynamically add them to CSS files that override the incorrect colors currently provided by the ChromeControl.
Here's a link to our blog about the workaround: http://www.efficiencynext.com/workaround-for-sharepoint-add-in-chromecontrol-issue/. The ThemeHelper class can also be downloaded at this location.
Likewise, a link to our video on YouTube shwoing the workaround in action: https://youtu.be/KP0eTdyjj_w
I hope this helps! I know SPFx gets a lot of attention, albeit if you are looking to integrate external web applications into SharePoint Online, the Add-In model is a very important tool!