Protiviti / SharePoint Blog

SharePoint Blog

April 15
Adding Your Own SharePoint Ribbon Font Styles
Whether it's a rich HTML field or content editor web part, editing text within the content area provides some font formatting options in the ribbon like these...

Font Selection



Page Elements and Text Styles


Here is a great article on how SharePoint uses the Theme Fonts, Page Elements and Text Styles throughout its interface and when creating themes... But what if you wanted to add your own fonts or page elements or update the existing styles for the ones already there? Here's a little guide to show you the syntax of these items. Just simply add the css to your stylesheets like below.

Theme Fonts

    font-family:"Segoe UI","Segoe",Tahoma,Helvetica,Arial,sans-serif;
You can see that it adds a span with the class specified above which allows you to style it anyway you need. 



    -ms-name:"New Font";
    font-family:"Times New Roman", Times, serif;
This adds a new font to the list for selection... 


and updates the HTML with a span with the class specified above. 


Page Elements {
    -ms-name:"Markup Style DIV";
This adds a new Page Element for selection... 


and these are unique in that you can specify the HTML tag that surrounds the text. The 'div' in the css selector above tells SharePoint to add a DIV around the text with the given class. 


Text Styles

You can see that it adds a span with the class specified above which allows you to style it anyway you need.


Technically with any of the out of the box font styles and page elements you can just use the selectors and style them the way you need without having to use the -ms-name: attribute to specify the name of the styles, but I wanted to show the syntax of these styles entirely.

- Sonny

If you're interested in learning more about SharePoint Design, check out our Design and UX blog archive!

If you'd like to explore SharePoint Design training options, feel free to browse our Training Events Calendar​

Quick Launch

© Protiviti 2020. All rights reserved.   |   Privacy Policy