0

This is connected to How do I change the Site Page grey header on SharePoint Online O365

But I want to know if it possible to change ALL site pages in a librarys header automatically- either with settings or programmatically. Reason is that I have hundreds of pages, and the grey dark header makes the title hard to read, but changing everything manually will take a lot of time.

1 Answer 1

0

Create Application Customizer so you could override default CSS.

Similar thread about checking page library.

https://social.msdn.microsoft.com/Forums/office/en-US/d6d56c87-5110-41d0-bcf4-760955f70a7b/i-want-to-apply-application-customiser-to-all-the-modern-pages-under-site-pages-library-in?forum=sharepointdevelopment

The CSS to override default CSS.

const css: string = 'div[data-automation-id="titleRegionBackgroundImage"]{background-image:none !important;background-color: coral!important;}'; if (css) { // inject the style sheet const head: any = document.getElementsByTagName("head")[0] || document.documentElement; let customStyle: HTMLStyleElement = document.createElement("style"); head.appendChild(customStyle); customStyle.title = "MSCustom"; customStyle.type = "text/css"; customStyle.appendChild(document.createTextNode(css)) } 

Sample result.

enter image description here

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.