Closed vomos2020 closed 11 months ago
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
@vomos2020 - could you please provide more information on this issue?
@AJIXuMuK here's the theme definition $palette= @{ "sb_themePrimary" = "#06858ะก"; "sb_themeSecondary" = "#fff200" ; "sb_themeTertiary" = "#fff200" ; "sb_neutralPrimaryAlt" = "#27251f"; "sb_neutralPrimary" = "#27251f"; "sb_themeLight" = "#fffccc"; "sb_themeLighter" = "#fffee5"; "sb_yellow" = "#fdba00"; "sb_accent"= "#ff3d00"; "sb_neutralTertiaryAlt" = "#27251f"; "sb_neutralQuaternary" = "#27251f"; "sb_neutralQuaternaryAlt" = "#90a0b7"; "sb_neutralLight" = "#e6effd"; "sb_neutralSecondary" = "#f9fafc"; "sb_black" = "#000000"; "sb_white" = "#ffffff"; "themePrimary" = "#27251F"; } Add-SPOTheme -Name "Test Intranet" -Palette $palette -IsInverted $false Add the attached web part to a modern home page also add an OOTB button. theme-test.zip Change the site theme to Test Intranet The right side of web part will change it's colors also the Button color. Refresh the page - colors will revert on the right side but the OOTB button will remain with theme. We need to wait also for @vomos2020 developer to answer question 1 (from spfx I assume that is using it's own theme and palette).
@AJIXuMuK hi, we use this in code export const theme = window.themeState?.theme; export const spTheme = { themePrimary: theme?.sb_themePrimary, themeSecondary: theme?.sb_themeSecondary, ... };
@AJIXuMuK we've also noticed this bug on multiple tenants. We've uploaded a custom theme using Add-SPOTheme but the value for neutralLighter
reverts to a default SharePoint colour (#F0F0F0) after a page refresh.
@vomos2020 @sosandumsft - unfortunately we don't support custom properties in the theme (sb_
prefixed ones in your case).
I would recommend having a mapping where based on the primary color of the theme you can grab all others from your custom code.
@CallumCrowley - the issue with neutral colors has been discussed here and here
Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
๐ฅ SharePoint Framework
Developer environment
Windows
What browser(s) / client(s) have you tested
Additional environment details
Describe the bug / error
We use custom color palette for branding custom spfx web parts. We are facing an issue that after some time after refreshing setting in spfx webpart custom colors became reverting to default colors. We checked on different tenants and this issue reproducing only on specific tenant not on all.
We used Add-SPOTheme -Name "Custom theme" -Palette $palette -IsInverted $false to deploy custom palette.
Steps to reproduce
Expected behavior
After applying new color palette color must change on all custom spfx webparts