Reputation: 194
I am looking for a option to hide the header globally. So, is there any way to add styles globally in sharepoint framework.
Note: Opted Reactjs to build we parts.
Upvotes: 1
Views: 3146
Reputation: 175
I would inject a custom CSS stylesheet using an application customerizer.
Here the code to inject your custom CSS: https://github.com/hugoabernier/react-application-injectcss
Here is an article I wrote that explains how to do it: https://tahoeninjas.blog/2018/05/08/inject-custom-css-on-sharepoint-modern-pages-using-spfx-extensions/
The article explains why you should be careful with such customizations.
Let me know if you need help with the CSS.
Upvotes: 0
Reputation: 5493
You could create a Application Customizer to hide the element for modern view globally.
My test result.
$(document).ready(() => {
$("span:contains('Office 365')").css('display','none');
})
Upvotes: 0