Buttons are blue

Good day, I have 2 sites, at one it's ok with buttons color


another, all buttons are blue

how to make them green by default? Site schema is green, and i don't use css.

Dear @ixxxl,
Is this a custom theme or one of default SharePoint themes? How long ago was the site created? How long ago were the forms created?

@Nikita_Kurguzov
It's a default theme. Site and forms(the old one or new are the same) were created more then 12 months ago

Dear @ixxxl,
Any difference in how the forms were created? Have you tried re-saving the forms?

@Nikita_Kurguzov
Standard creating from button in a list "Desighn Forms". Tryed to resaving multiple times. no result. find some css code form @mnikitina like .btn-principal , but it makes buttons differnt of standard and close button remaining always blue...

Dear @ixxxl,
Okay, please, go to both forms, open browser's console and run the following code:

__themeState__.theme

Send us a screenshot of both forms and consoles (so both buttons and code are visible) after the code runs to compare the results!

@Nikita_Kurguzov



The problem in theme?

selected theme in both sites

Dear @ixxxl,
Despite appearances, it's likely that one of the themes was slightly modified, and now is not supported, as custom themes are not supported in SP2019 at the moment.

Please, make sure to switch to the default green theme (can first switch to another, then back to green).

@Nikita_Kurguzov
Strange , today i open site where yesterday buttons were blue , and now it's ok


@Nikita_Kurguzov
It come's back again.. i tried to change as you say another theme, than put it back. It works only not for a long time, and after it come's back in blue ..

Dear @ixxxl,
There must be something that changes the theme, maybe like a script or a setting? Perhaps someone manually changes one of the colors. Otherwise, this shouldn't be happening.

Does this happen only on this site alone? Or are there any other sites affected? It could be a SharePoint bug as well.

@Nikita_Kurguzov
i don't have such script or settings to change theme
Sometimes it happens at the site where worked previosly. Resfresh the page sometimes helps

Dear @ixxxl,
If this is the case, it might affect things outside the forms as well. It might be worth contacting Microsoft support on this one.

As for the buttons, I'm afraid you'll need to set their color with CSS to make sure it matches.

1 Like

@Nikita_Kurguzov
Hello, a put custom css on the buttons, but one browser(chrome) show correct ,dark buttons, another firefox shows blue..

Dear @ixxxl,
Okay, can you share the custom CSS with us? If we can test it, perhaps, we can help you adjust it.

@Nikita_Kurguzov
CSS.css (3.4 KB)
Good day , i call this css from js in form:

fd.created(function(){
    var imported = document.createElement('link');
    imported.href = 'https://intranet/procese/DocJS/CSS.css';
    imported.rel = 'stylesheet';
    imported.type = 'text/css';
    document.head.appendChild(imported);
});


window.setWindowParams =function (set) {
 if (set == 1) { 
    window.fd = fd;
	window.$=$;
 } else {
	window.fd = "";
	window.$="";
 }
}