Why does my custom CSS keep breaking in SharePoint Online? #M365AMA
In this episode, the #M365AMA panel discusses the following community question:
“My work uses SharePoint as our intranet, and we use custom styling to make a new page header. In aid of that, we have used css to hide the default header using
.mainContent div[data-automation-id=pageHeader]:first-child { display: none; }
However it has recently just… stopped working? Any ideas as to why that might happen? I know this is a shot in the dark, and am currently looking through what might be causing the issue internally!”
Check out the discussion here:
Participating in this discussion were:
- Christian Buckley, RD+MVP @buckleyplanet
- Shari Oswald, MVP+MCT @shortcutshari
- Jay Leask, Microsoft @jayleask
Some relevant notes/links shared by the team:
- Has SharePoint DOM changed? [https://www.reddit.com/r/sharepoint/comments/1e9qou3/has_sharepoint_dom_changed/]
- Change the look of your SharePoint site, via Microsoft Support [https://support.microsoft.com/en-us/office/change-the-look-of-your-sharepoint-site-06bbadc3-6b04-4a60-9d14-894f6a170818]
- Branding issues that may occur when upgrading SharePoint [https://learn.microsoft.com/en-us/sharepoint/upgrade-and-update/branding-issues-that-may-occur-when-upgrading-to-sharepoint-2013]