Is it in anyway possible to add custom fonts to Sharepoint Modern sites/pages? I know it's possible to change the theme for Sharepoint Online, but it's very limited (only color palette).

I don't want to use classic experience and/or Masterpages.

Would it be possible to add custom fonts to custom webparts and thereby applying to the whole site/page?

Any advice is welcome.

1 Answer 1


As you know, the officiel Theme Palette is quite limited concerning customization of your site.

I've personally been using SharePoint Framework to customize it's appearing. When you make a SPFx Project, you can create an Application Customizer which will be able to execute JavaScript on every frontend page.

In your project, you may know that you have SASS customization, which is by default scoped to your components, but nothing prevents you from including a standard global CSS file, or scoping your SASS file to global (:global {}).

Unfortunately, your customization files will only be loaded after the whole framework and you will be able to see before/after at page load. The silver lining here is that it only appears once in your user navigation since the SharePoint Modern Experience does not reload the whole page as long as your navigating inside your Site.

Don't hesitate to ask for more details,

Hope this helps !

  • Great! Thanks for the info. So it would be possible to override the default styles associated with the modern ui via SPFX, but the downside is that it would show on initial pageload?
    – TietjeDK
    Commented May 16, 2018 at 11:35
  • 1
    That is exactly it. They seem to be working on something more integrated but right now, I believe this is the only solution to customize the appearance of SharePoint Modern Pages (I've beenj using it to hide comments, navigation, reduce the banner size, increase logo size, ...) Commented May 16, 2018 at 11:43
  • @Anber Peter : Thanks for the provided details. Is it possible to apply fonts on the documents as well ? Is there any way in SPO that accepts the font information in the URL of document viewer page and loads the document with the passed font parameter in the URL ? Commented Oct 2, 2020 at 7:12
  • For posterity, documents viewer are not customizable at all, your developments on the site (SPFx) are never loaded in the file. As this looks like a rather odd request, I'd rather advise to use documents templates in SharePoint Libraries to control documents stylings. And if you're dragging many documents, just do as I did and script (PowerShell) a document conversion on every docx to change their template/stylings. Commented Mar 15, 2023 at 8:36

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.