1

With the following script i set a theme in a sitecollection

Connect-PnPOnline -Url https://mySP.sharepoint.com/sites/test2 -Credentials $script:psCredentials
Set-PnPTheme -FontSchemeUrl _catalogs/theme/15/fontscheme004.spfont -ColorPaletteUrl _catalogs/theme/15/palette025.spcolor

If i understand this correct palette025.spcolor is the "Dark Yellow" theme. When the theme is set with powershell this is the result:

As you can see the theme is now darkyellow but the font color is wrong. If i add SPFx extension TopNavBar that also has wrong font color.


When i am adding theme manually from sharepoint it gives the same result, It looks fine in the menu but when i press Apply its getting wrong again.

What i can see from debugging the page its this css that messing this up.

<span class="ms-CommandBarItem-commandText itemCommandText_cf1861fb">Page details​</span>

   .SPPageChrome-app .ms-CommandBar .ms-CommandBarItem-commandText {
color: #333333;
vertical-align: top;
padding: 0 4px;
}

While i am in the menu of selecting a theme "When the theme is working" before i Apply this is the css

<span class="ms-CommandBarItem-commandText itemCommandText_cf1861fb">Page details​</span>

.SPPageChrome-app .ms-CommandBar .ms-CommandBarItem-commandText {
color: #ffffff;
vertical-align: top;
padding: 0 4px;
}

If i navigate to Documents or sitecontents the font color is correct.

My thoughts about the problem is:

  • When a new sitecollection is created a theme catalog is created with this path: _catalogs/theme/15/ and copying all available themes here from the root gallery . The root palette025.spcolor have a font color property that is wrong.
  • This is a office ui fabric css and its some kind of css failure

Does anyone know how to edit the font color or reset it so i can get the menu text back?

  • I might add that all dark theme the font color is wrong. – Petter Dahl Nov 29 '18 at 14:51

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.