Forum Discussion

SGajavelli's avatar
SGajavelli
Copper Contributor
Dec 28, 2020

Clarification Required (CSS): Customizing Modern Site Pages

Hi,

To customize the look and feel of the site, we made use of classes provided by SharePoint modern pages (eg: CanvasSection-xl8, CanvasSection, etc.). But soon, there was an update in SharePoint's CSS, due to which we had to rewrite our custom CSS/JS.

Can anyone please let us know which classes are not likely to be changed in the future, since it is not documented anywhere? Also, there is a data-automation-id attribute that is present in the DOM, can we use that or that too can change?

Any suggestions or information is highly appreciated.

Thanks

1 Reply

  • Unfortunately you are not going to find a clear answer for this ask :-(. Microsoft makes the kind of changes you mention here without further notice and that ends on breaking custom code that rely in the DOM