I have a requirement to change the font family in SharePoint modern communication site. I have found a following extension: https://github.com/SharePoint/sp-dev-fx-extensions/tree/master/samples/react-application-injectcss which can be used to inject css.

Question is, what css class do i need to use to change the font throughout the site? Can someone please help, thanks in advance.

Someone here has done it successfully: https://social.technet.microsoft.com/Forums/en-US/c6f74483-5d13-476d-8069-9f0d04338b92/can-we-change-the-fontfamily-of-our-sharepoint-online-modern-experience?forum=onlineservicessharepoint

But I am just not sure what css classes need to be overwritten for font family purposes, it would be helpful if someone can share some info.

1 Answer 1


If you want to change font family for all the text of the modern site page, we can use the CSS style below to achieve it.

 font-family: cursive !important;

enter image description here

  • Thanks @LZ_MSFT, I am going to test this out and mark it as completed if it works.
    – mdevm
    Commented Jun 19, 2019 at 13:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.