Category Archives: Benjamin Niaulin

SharePoint 2010 Ribbon CSS Classes Explained

You may also be interested in: SharePoint Conference.ORG 2013


Editor’s note: Contributor Benjamin Niaulin is a SharePoint Specialist at Sharegate. Follow him @bniaulin

There are many classes with names like ms-cui-tts which mean nothing to me when I look at them for the first time. Of course, I could look at a CSS chart or inspect the web page using F12 in IE and Chrome to see what was applied but nothing was clear to me. That’s why I decided to show you the classes from my perspective.

Before the toolbars came the tabs

I don’t want to dive right in the actual list and library ribbon so let’s look at the tabs that get us there before.


So I took out my scalpel and started digging…

The tabs at the top are generated using an Unordered List, you usually see that in HTML as "UL". And inside this list we have List Items or "LI" which represent each tab generated. But there are some exceptions, surprised? When you are looking at the tabs, it’s true that each tab is a LI or list item but someone of them are split into more tabs… I’ll explain. If you look at the image above, it’s simple enough.

We have a UL and inside we have a LI for Browse and a LI for Page, that’s easy. However if you’re looking at Library Tools for example.


You might think we have 4 different LI right now, well I thought so too but no. Here is what this looks like.

        <LI>Library Tools</LI>

Before you jump to the comment section, yes I know this is not the real HTML code used by SharePoint but it’s to help visualize better.

What does this mean? It means we have to be careful when we do our CSS as it may not always work the way we expected, a single tab becomes two tabs…confusing. But if we make sure to write good CSS we should be ok.

Let’s look at the UL that generates all the tabs.

<ul class="ms-cui-tts">

Be careful, as there is another class we will be using very soon ".ms-cui-tt-s" note the very slight difference at the end. The latter with -s is the selected state of a tab whereas .ms-cui-tts is the UL that is the container of all the tabs.

Then we got the actual tabs themselves, so the LI inside the UL. They use the class ".ms-cui-tt"

What did we just learn?

<UL class="ms-cui-tts">
        <LI class="ms-cui-tt  ms-cui-tt-s">Browse</LI>
        <LI class="ms-cui-tt">Page</LI>

Well, seems like we’re getting somewhere but I am still having issues with the last one "Library Tools". We’ve established that "-tts" is the container for the list of tabs for the ribbon. We also found out that "-tt-s" is when a tab is in a selected state. Finally, every tabs use the "-tt" CSS class. But we do have exceptions, the "grouped tabs" like Library Tools. Instead of using ".ms-cui-tt" like every other tabs, the group calls a class called ".ms-cui-cg" I am guessing the g is for group but it’s hard to figure out the naming convention on these classes.


.ms-cui-tts (The entire list of tabs)


.ms-cui-tt-s (A tab that is selected)


.ms-cui-tt (tabs – mainly used for positioning)


Remember not to actually brand the tabs but the anchors inside the tabs , they use .ms-cui-tt-a. Another class to remember? Yes I know it seems complicated but with enough practice you’ll get the hang of it.

So if you wanted to brand all the tabs orange for example, you would do this:

.ms-cui-tt { 

Which will give you something like this:



Can you tell me what we would use to change the look of a selected tab?

That’s right!

.ms-cui-tt-s { 

The Browse Tab

Probably the easiest one to figure out, it is still under .ms-cui-tt but has another CSS class specifically for itself called .ms-browseTab. Of course that CSS class is only used to specify that this is the Browse tab, it doesn’t really apply any design. If you want to design the Browse tab you must use it in conjunction with the anchor that is below it to be more specific and win the CSS battle.

To brand the Browse tab use:
.ms-browseTab >

To brand the Browse tab when it’s selected use: >

Remember, as we saw above, the .ms-cui-tt-s is the class used when a tab is selected, that’s why I used it above. Don’t forget to add :hover at the end if you also want to change the design of the hover state. Try playing with the top margin and some padding and see how you can make the browse tab more evident for the users.

The dreaded grouped tabs

Ok perhaps I am exaggerating, but I have had some tough times with it. The CSS classes are horribly named and using bad practices, so of course it wasn’t the most exciting experience.

So here is my understanding, we said the ribbon tabs are in a container that uses .ms-cui-tts that each tab uses .ms-cui-tt and that when they are selected they use .ms-cui-tt-s. We also established that these classes are really for the positioning of the LI (List Items) that are the tabs but we don’t really use them to "brand" the tabs themselves. To do that we reach down to the anchors inside We also saw that the "Browse" tab has his own class to differentiate it from the others. So what about those Grouped Tabs like Library Tools and Editing Tools?

To understand the CSS classes used we first need to speak the same language as them, that language is called “Geek”.

SharePoint CSS Geek Dictionary for the Ribbon:

tt = Tab Title
tt-s = Tab Title Selected
tt-a = Tab Title Anchor
cg = Contextual Group
ct = Contextual Title

So here is what happens, normally under the UL that uses .ms-cui-tts we have a LI for each tabs that use .ms-cui-tt right? Well for the Grouped Tabs or "Contextual Group" SharePoint uses the class .ms-cui-cg instead.

Wait what?

Regular Single Tabs:

<ul class="ms-cui-tts">
        <li class="ms-cui-tt  ms-cui-tt-s">
                 <a class="ms-cui-tt-a">
        <li class="ms-cui-tt" >
                 <a class="ms-cui-tt-a">

(note that the above CSS is for explaining and not the actual html/css in SharePoint)

Contextual Group Tabs:

<ul class="ms-cui-tts">
        <li class="ms-cui-tt  ms-cui-tt-s">
                 <a class="ms-cui-tt-a">
        <li class="ms-cui-tt">
                 <a class="ms-cui-tt-a">
        <li class= "ms-cui-cg">
                 <div class="ms-cui-cg-i">
                        <div class="ms-cui-cg-t">Library Tools</div>
                 <ul class="ms-cui-ct-ul">
                        <li class="ms-cui-tt">
                              <a class="ms-cui-tt-a">
                        <li class="ms-cui-tt">
                              <a class="ms-cui-tt-a">

Basically, I’ll spare you the html above, it means that instead of using the usual .ms-cui-tt for the next tab, because it’s a contextual group SharePoint uses another class called .ms-cui-cg. And under this LI we have a DIV for the group title like “Library Tools” as well as another UL with the class .ms-cui-ct-ul which simulates .ms-cui-tts in a way to start another tabs menu below it. Then as you can see above the class uses for the individual tabs are the same.

What I noticed as well is that on the LI that uses the Contextual Group CSS class .ms-cui-cg there is also another class applied that defines the color: .ms-cui-cg-db

This one for example the db means Dark Blue, Heather Solomon wrote an article very recently listing all of them. Think we had the same article idea, at the same time hehe. Check out the bottom of her article for some details on the contextual groups.

What she suggests, is to use

li[class*="ms-cui-cg"].ms-cui-cg-s .ms-cui-cg-t 

As a catch all for the selected contextual group (remove the –s at the end of .ms-cui-cg-s to get the inactive ones or add ", ms-cui-cg-i" where the i represents inactive)

This would allow you to brand all the ribbons the same color.

However, if you want to get a specific menu like Library Tools, you will have to work a little. .ms-cui-cg-t { 
} .ms-cui-tt { 
} .ms-cui-tt-s { 



Hope this help you understand some of the branding around the ribbon.

SharePoint: I didn’t know you could do that with CSS!

You may also be interested in: Documentation Toolkit for SharePoint


Editor’s note: Contributor Benjamin Niaulin is a SharePoint Specialist at Sharegate. Follow him @bniaulin

Not long ago, I started a branding series to get closer to how I could change the look and feel of my SharePoint site without dealing with tons of complicated code stuff. So I looked at the basic elements of a SharePoint site, mainly the navigation, and with CSS I discovered a whole world of possibilities. In time, I even pushed on to realize jQuery did not have to be a scary word only developer’s use. You can find links to my series here.

I decided to start a series that will show you some cool little tricks you can do with CSS. If you are not sure how to apply CSS, go back to the first articles of my series above where it is described in details. In short, you can use the Content Editor Web Part to a CSS that will apply to a single page. The one with the CEWP on it.

Hide the Quicklaunch

We all love the quicklaunch, navigation menu on the left.


But there are times when you would rather maximize the page content and leave the quicklaunch out of it.


The solution is but a few lines of CSS:

#s4-leftpanel {
    display: none
.s4-ca {
    margin-left: 0px

The code above hides the “left panel” (quicklaunch) and gives the “Content Area” (.s4-ca) full width by starting from 0px on the left.

Hiding the “Recently Modified” of wikis


Probably the most popular demand I get during sessions or at conferences.

This will do the trick:


SharePoint uses a class called s4-recentchanges to show it

Hiding “I Like it and Tags and Notes”

I do get this request from time to time. Although I don’t always agree as it adds a great value to the end user on SharePoint and My Profile.


.ms-socialNotif-Container {

And it’s gone

Change the look of hyperlinks with specific words in the link

Let’s say you want to add an icon for every link to “My Sites” in your SharePoint. Or simply change the font and color of links to the company web site.


In this example, I want to change the color of the link to the Sharegate site to orange and make it bold. But I don’t want to do this only to this hyperlink, that would be easy. I want CSS to always find the links wherever they are and change it automatically

A[href*='share-gate'] {
    COLOR: #e36c09; 
        FONT-WEIGHT: bold


Stay in touch via twitter @bniaulin

10 Reasons your SharePoint Migration Failed


Editor’s note: Contributor Benjamin Niaulin is a SharePoint Specialist at Sharegate. Follow him @bniaulin

I have written a few articles on SharePoint migration in the past few months. I also consider myself lucky to have participated in a few SharePoint 2013 migrations already. I know, only a SharePoint Geek could find that to be a good thing. What I realized is that many make the same mistakes when starting a new project or migrating to a new version.

That’s why I decided to create a “fun” presentation on Slideshare that can be consumed by everyone (not just geeks) to show what can cause your project to fail. Of course this does not go into detail, though for those that are looking for it I have provided some hyperlinks towards the end of the presentation.


Enjoy this story2013-04-22-SharePointMigrationFailed-02.png

How to Edit the SharePoint 2013 Preview File for a Master Page

You may also be interested in: SharePoint-based solutions by B&R Business Solutions


Editor’s note: Contributor Benjamin Niaulin is a SharePoint Specialist at Sharegate. Follow him @bniaulin

In a previous post, I covered the new SharePoint Design Manager by showing how to add Device Channels and Converting an HTML page into a Master Page. I then took it to the Composed Looks available for power users and showed how to create your own Composed Look. There has been one thing that I was never really 100% comfortable with and that was the Preview file for Master Pages. In this article, I want to go in depth into how the Preview file is created and how you can customize it.

What is the Preview file associated to Master Pages?

Let’s start from the beginning, in a few articles online you may have seen the mention of a Preview file that has the same name as a Master Page and the author mentioning it’s important to have it.

We have established that now we work in the HTML file and SharePoint takes care of the Master file. But, what about the preview file, what is it for exactly and how do you change it?

Note: Don’t worry if you do not see a html file along with the Master and the Preview. The html file is for the Design Manager and is created when you activate the Publishing Infrastructure Feature.

The Preview file for Master Pages has a very precise goal.

It allows your Master Page to show up in Composed Looks:

It is also responsible for generating previews of your Master Page in different formats:

Already we can tell we are going to have some issues because of the different sizes and the different screen sizes.

Recap: We can assume that the Preview file is not a required file for Master Pages to work. It is only required if you want the Master Page to show up in the “Site Layout” menu of Composed Looks and to generate previews for the Power User before selecting the actual Master Page.

The Preview file MUST be named exactly as the SharePoint Master Page it is associated to.

Preparing the SharePoint Master Page to create a Preview file

The actual file is easy to create, simply copy paste one that already exists like Oslo or Seattle and rename it. Voilà! Your Master Page now shows up in the drop down menu for Composed Look. We saw that in my post on Composed Look so I won’t cover it here again. Our goal will be to properly edit this Preview file in SharePoint.

First let’s edit the Master Page to have something to test

To make sure I have something to test in the preview file, I need something different in a Master Page. If you were at SPC in Vegas you might want to refer to SPC065, a session where they covered this very well. I am going to use a similar example by creating a Footer.

I will begin by copying the Seattle Master Page and renaming it to Sharegate.

So far, that was the easy part.

Saving your CSS file in a very specific location

I am going to start by creating a blank CSS file where I will save my custom CSS stuff. But you can’t just store it anywhere you want. Similar to the SharePoint 2010 theming engine, the SharePoint 2013 theme engine requires the CSS file to be stored in the Style Library under the correct language in a folder called Themable. This is VERY important, otherwise nothing will work. The Theming engine depends on the CSS stored in that folder.

Now I will quickly reference my CSS in my Master Page directly.

Opened Sharegate.html in Edit Mode and added a CSSRegistration:

Since I am working with Design Manager (using html files) I can only edit the HTML file. The trick is to write your CSSRegistration properly or it won’t work. Remember, we are in an HTML file and not aspx.

<!--SPM:<SharePoint:CssRegistration Name=" Library/en-US/Themable/Sharegate.css" runat="server" />-->

Directly below the other CSSRegistration already there in the html file, towards the end of the <head> tag.

My CSS had a basic background-color red on the <h1> tag so after I click on save and change the “Change the Look” settings to use my Master Page, I should be able to see the difference.

If you are not working with HTML Design Manager

On the other hand, the code is different if you are linking your CSS directly in a Master Page and not using any html files for your branding.

Open the .master file and add the following instead, below the existing CSSRegistration:

You don’t have to use <%$SPUrl if you don’t want to. Enter the url for your CSS file directly in the quotes of the Name= if that’s what you prefer. Beware of changing URLs though.

Let’s take it out for a spin

To make sure everything is ok so far and that we understand what has happened, let’s try some theming.

I changed the CSS in my Sharegate.css to:

h1 {
/* [ReplaceColor(themeColor:"SuiteBarBackground")] */ background-color:#FF0000;

This still gives me a Red background color but I also said to use the same color as the one associated to “SuiteBarBackground” in the .spcolor file we saw in our last post for the Composed Look.

Now if I go to Change The Look in the Site Actions or Site Settings and change the Color Palette, I should see the background color of the Site title change as well.

Notice that the preview does not show any of my changes so far.

Let’s click on “Try it out”

As you can see my background color took the same color as the Suite Bar Background on the top, it is now green.

Awesome! Now let’s create a footer to complete our design test

For the fun of it I want to create a quick Footer to have a new <div> in our Master Page to really show you a complete tour of the Preview file we will have to create.

Create a footer in SharePoint Master Page 2013

To create the footer I will simply create a <div> and a <span> with some text in it, most of the work will be in the CSS file. This <div> needs to be right after the closing tag of the contentBox div shown below.

<div id="myfooter">
     <span class="myfootertext">This footer was created by Benjamin Niaulin

This gives me the following result on my SharePoint Master Page:

Now all I need to do is play with the CSS while remembering to apply theming to get what I want.

Here is what my new CSS looks like (I changed the red background on my h1 to match the blue):

h1 {
/* [ReplaceColor(themeColor:"SuiteBarBackground")] */ background-color:#0072c6;
} {
/* [ReplaceColor(themeColor:"SuiteBarText")] */color:#fff;
#myfooter {
padding:8px 20px;
/* [ReplaceColor(themeColor:"SuiteBarBackground")] */ background-color:#0072c6;
/* [ReplaceColor(themeColor:"SuiteBarText")] */color:#fff;
.myfootertext {

Needless to say that with my design so far the colors of the background and the text of the Site Title and Footer will now automatically change based on the Color Palette chosen as part of the Composed Look.

Create the SharePoint Master Page Preview file

This is why you clicked on the link and arrived here, the Preview file associated to your SharePoint 2013 Master Pages. It took me a while to fully understand how it works.

It’s as if the Preview file is a Master Page on its own…kind of.

Although it is associated to your Master Page, I realized it really wasn’t that much. We name the .preview file exactly the same as the Master Page so SharePoint knows which one to pull when you need to preview it. But, the preview file really has nothing else that ties it to your Master Page. It’s a Master Page on its own that needs to be modified.

After all my modifications on the site title and the footer I added, here is what my preview looks like:


A big problem with the Preview file

As you just saw, there are at least two sizes the preview of your SharePoint 2013 Master Page comes in. What do you think will be my problem?

All sizes in CSS will have to be re-written to use % instead of pixels. That is going to be a pain.

Understanding the SharePoint Preview file

First thing you need to know is that the best way to look at it is as Text.

The SharePoint Master Page Preview file is split into four sections.

I skipped through the large file to give you smaller screenshots above.

So we have 3 [SECTION] separating the file into 4.

  1. The first section identifies which .spcolor file you would like to use in this preview. This is really for the first screen when you are choosing between multiple “Looks”, the Gallery if you want. This has nothing to do with the .spcolor file associated to your Composed Look, it’s really only for the preview.
  2. The second section identifies the .spfont file you would like to use in this preview. Again this is the same thing as the .spcolor file. So far so good.
  3. The third section is crucial, it’s the CSS. However, it’s not the CSS you are used to. You will notice that they all have a prefix of [ID]. This is to identify which theme this CSS property is associated to. Remember that all the Preview files will be loaded at the same time on a single page. It’s important for each of these to have the [ID] in front.Also it is very important to use ONLY CSS Classes and no IDs! Let’s put some perspective on it.

    All these previews above are using [ID] in front of each of their CSS styles to identify which square it will be associated with. What do you think would happen if we started using Id’s instead of classes inside our styles? (Do not confuse [ID] with a CSS style that references an Id)

    It is extremely important for us to use CSS classes only in our preview file.

    A common practice is to name your CSS classes in the Preview file with .dgp-nameofclass. The dgp stands for Design Gallery Preview and is not necessary, it’s really just following a naming convention that SharePoint already has.

    Remember to use only % in your CSS for sizes and not pixels.

  5. The fourth section is the HTML that is shown in the Preview of the Master Page.

Let’s add our changes so the Preview file reflects our changes

The first 2 sections defining the font and the color palette I wish to use, I don’t really need to touch in this scenario because I didn’t create any custom ones. What I do need is to define my new CSS classes in the 3rd section and add the additional HTML in the 4th.

I started with the last section to add my HTML in there, it looks a lot like the HTML we used for the actual Master Page except it uses classes and not IDs.

<div class="dgp-myfooter">
     <span class="dgp-myfootertext">Preview of the Footer text is here

As for the CSS in the Preview file of the Master Page:

Simply go to the end of the CSS Section and copy paste your CSS classes.

Every selector needs to have an [ID] token and to remove the selectors that are using Ids and use classes. (like we did in the section 4) I also need to change all the attributes using pixels into percentage and rename them to .dgp-nameofclass. Also, since the preview file does not use the theming engine we will have to replace the annotations defining the theming colors into something that can be used in the preview file. Tokens that will be picked up by JavaScript SharePoint uses.

Here is what the CSS looks like in my Preview file after I copy pasted at the bottom of the 3rd section and made my modifications:

[ID] .dgp-myfooter {
padding:1% 2%;
[ID] .dgp-myfootertext {

Let’s look at the changes

After I saved all my files I went back to Change the Look menu in SharePoint 2013 and this is what I saw.

Notice that my footer now shows up in the small preview, let’s try the larger preview.

Try changing the colors. Everything will work as expected since we used the Tokens to define the colors for both the background and the text of the footer.


There are other new cool things like the ThemableForegroundImage with SharePoint 2013 that use the Theming Engine. We will cover that in a next blog post. Right now we covered extensively the Composed Look and the Design Manager throughout all my blog posts. Hope this helps you edit the Preview file that is associated with your Master Page, it took me a while to figure it out and frankly, the SPC Session that covered it really helped. The Master Page Preview file feels, to me, like a master page of its own just with different ways of writing it.

This should show some very interesting concepts inside your company, to create these “Composed Looks” and allowing the Power Users the control of choosing different colors based on their region, team, etc… But keeping a standardized company Look and Feel.

Webinar: Understanding SharePoint Content Types


Editor’s note: Contributor Benjamin Niaulin is a SharePoint Specialist at Sharegate. Follow him @bniaulin

In a continued effort to help new SharePoint users adopt the platform, I began a Webinar series on Understanding SharePoint a few weeks ago.  My first online session for this series covered the basics of a site. You can still find a recording of “Understanding the SharePoint Basics” if you missed it.

This online session will cover SharePoint Content Types. I know, the word seems complex and it feels only the SharePoint Experts are using it. But it doesn’t have to be complicated.

Session information:

Date: Wednesday February 13th at 1:30pm Eastern Time

The purpose of this session is for Power/Super Users to get familiar with Content Types in their site. Really understand what they are and how to leverage them when creating Collaboration sites or even Publishing Sites. One of the examples we will cover is how to manage “Invoices” throughout your Site Collection easily.

What is a Content Type?
An introduction to the concept of SharePoint Content Types in Sites and Site Collections.

Creating a Content Type
See how we can create a Content Type properly, using the SharePoint interface

Using Content Types
Associate a Content Type to list and libraries in your Site Collection

Understand existing Content Types all over your Site
Microsoft has already created many for SharePoint. We will look at the ones you have been using and how you can leverage them.

I will also give some time for questions at the end, the goal of this online session is for everyone to properly understand what Content Types are and how to use them.

I hope you will join me on Wednesday February 13th 2013 at 1:30pm (Eastern Time) for this online session.
Register to save your seat.

Step by Step: Create a SharePoint 2013 Composed Look

You may also be interested in: SPTechCon 2013 - San Francisco


Editor’s note: Contributor Benjamin Niaulin is a SharePoint Specialist at Sharegate. Follow him @bniaulin

With the introduction of SharePoint 2013, we saw many things change. Some of the major new features relate to branding. In previous posts, I have explored in detail how to convert a regular HTML into a SharePoint Master Page using the new Design Manager. I also covered some of the cool things we can do with the Design Manager like setting up Device Channels, etc. In this article, I want to focus on the new “Composed Look” available in SharePoint 2013. Now, I am not going to show you how to pick one that is already available, I am sure you can figure that one out. No, in this article we will create our own and make it available for deployment, step by step.

Discovery on how to use Composed Looks in your company

Perhaps it’s just me, but I just realized how powerful these Composed Looks are in the enterprise. The idea of templating your Branding, yet providing the flexibility to the user to make minor changes. I started thinking and saw the possibilities.

What is a Composed Look?

First, we need to make sure we understand what it is before we can start. So what is a Composed Look? A possible definition of the word “Composed” could be: “To make or create by putting together parts or elements”. I believe this fits with our use of this feature. A Composed Look is made up of:

  • Master Pages
  • CSS
  • Color palettes
  • Font palettes
  • Background image

Changing the Composed Look using the interface:


And some of the changes a power user can make using the interface:


What does this mean for you?

This means we can package a Master Page with its CSS, color palettes, font palettes and background image and have it deployed in the enterprise. With Composed Looks, you can now offer your Power Users a list of branded looks and allow them to choose an appropriate look as well as giving them limited control to make changes to the colors, image or font. You could be providing them Composed Looks.

Let’s create a Composed Look

Start with the SharePoint Master Page

I won’t explain how to create a Master Page in this article as I already covered it here. But the first step in creating a Composed Look is by creating a Master Page. The Master Page is the HTML structure that holds the design together with SharePoint controls to make sure everything works.

In this example, I will simply copy one of the existing Master Pages and name it differently. However, I need to know what to copy.

In SharePoint 2013, Master Pages are made of an HTML file, which is where we make our main customizations, a Master file that SharePoint reads and a Preview file. Do Not modify the .master file this file is handled by SharePoint.

The .Preview file should have the same name as the HTML and Master file, it is used to make Master Pages you create available in the drop down menu of “Site Layout” when modifying a composed look.

**You don’t need the .preview file to create a Composed Look but you will need it if you want to complete your Composed Look and make your Master Page available in “Site Layout” **


I copied and renamed the Oslo Master Page using SharePoint Designer. You can use SharePoint Designer 2010 or 2013 with SharePoint 2013; they both work for what we need to do.


You don’t need to rename the oslo.master file, it is linked to the html file and should rename itself.


Of course in this example my Master Page is still using the default SharePoint CSS files. In your case, it will be using a custom CSS file don’t forget to link it as you would usually do in your html file. It doesn’t impact the rest.

Let’s make sure my files are working for now by going to Site Settings and clicking on “Change the Look”. Select any look to modify and you should now see your Master Page appearing in the “Site Layout” drop down menu.


Of course right now it looks and acts exactly the same way as Oslo. I’ll explain the Preview file later on in this article.

The CSS and how to make it work with Composed Looks

Copying the Master Page was the easy part, now we have to make sure that the CSS, the designer or you wrote, is compatible with Composed Looks. What do I mean by compatible? The whole point of a composed look is to give the ability to Power Users to make customizations like colors and font.

If you have experience with SharePoint 2010 themes, you’re going to find this very familiar.

Earlier we mentioned that a Composed Look is made up of a few things, which include Color Palettes and Font Palettes. How do I know this and where do you find them?

Navigate to Site Settings and locate the Web Designer Galleries section to click on Composed Looks.


In here you will see the configuration for each available Composed Look in the site. One of our final goals will be to have our own listed here. For now, we just want to see how they are configured.


As you can see, a Composed Look needs to know what its Master Page, Theme (which I call a Color Palette), background image and font scheme (which I call a Font Palette) is.

So my next step will be to see what this .spcolor file is made of.

Understanding the .spcolor file

Using SharePoint Designer, navigate to /_catalogs/theme/15/ and there you will find all the .spcolor files we are looking for. Of course they are also located directly on the file server where SharePoint is installed but I don’t recommend modifying those files.

Here is what you can in SharePoint Designer once you navigated there:


Copy and paste one of the Palette spcolor files and rename it. The files will be displayed alphabetically in SharePoint.

I copied the Palette010 and renamed it in this example.


Because my file name starts with a B and all others with a P, my color file will be displayed first in the Color menu of my Composed Look.


If you scroll down you will see that there is another Color Palette with the exact same configuration as the first one. That’s because I copied the Color Palette 010 and made it my own to customize.

Editing the spcolor file can be done using SharePoint Designer 2010, 2013 or even notepad if you want.


The file is very straight forward and you can create as many Color files as you want. This file simply associates a “name” with a color value.

The cool thing is that SharePoint 2013 supports RGBA, this means you can apply transparency as well!

I won’t explain how to write the color value as someone already wrote a very detailed article on just that.

Let’s change the color value of SiteTitle and WebPartHeading for the fun of it and see what happens.


I decided to go with a light sort of green so we can see the difference. Save the file and navigate back to your site settings to choose your custom color palette.


If I look back at the original color palette that I copied from, we should see a small difference.



As you can see, just by changing the Color palette from the “Change the Look” screen of the Composed Looks I was able to give a different design to my SharePoint site.

Summary of the spcolor file:

An SPCOLOR file is a file that associates reusable names to a color value. Look at them like variables.

Using the names provided in the spcolor file in your CSS

Very similar to SharePoint 2010 themes, you can now apply these names provided by the linked spcolor file directly in your CSS.

Wait, how?

Why were my changes applied instantly after I saved my spcolor file? I never referenced those “names” in the spcolor file to anything.

If you recall, I simply copied one of the out of the box Master Pages offered by SharePoint. That includes the link to the out of the box CSS file used and referenced by the Master Page. That CSS file already has the names in the spcolor file used within it.

Here is an example of what the SharePoint CSS looks like:

/* [ReplaceFont(themeFont:"title")] */ font-family:"Segoe UI Light","Segoe UI","Segoe",Tahoma,Helvetica,Arial,sans-serif;
/* [ReplaceColor(themeColor:"SiteTitle")] */ color:#262626;

Notice that the color already has a value of #262626. However, it is preceded by what looks like a CSS comment with one of those “names” used in the .spcolor file.

You guessed it, when writing your CSS you can actually reference any of those names used in our spcolorfile anywhere. Once the Color Palette is applied through the Change the Look menu in site settings, it will overwrite whatever color you had specified in your CSS to the one in the spcolor file under the associated name.

Your responsibility:

It will require extra work when building the CSS to make sure you think about the possible changes you might want to apply.

Powerful in the enterprise:

Imaging the possibilities, the Composed Look can offer your company. Having a design created that can be tweaked by department or division or even by region. Applying slightly different colors but only at the places defined in the CSS.

The spfont file works the same way

As you may have noticed in my piece of CSS above, we can do the same thing to font as we did with colors. By that I mean, specifying our desired font in the CSS and allowing users to switch “Font” from the Choose the Look menu. Just like our colors, the Font palette will go through our CSS to find which classes have a “ReplaceFont” attribute and replace it with what we specify.

Let’s open the spfont file and see how it works. The spfont file was located in the same folder as our spcolor file /_catalogs/theme/15/.


The spfont file has already been explained here in detail so I won’t copy everything here.

The file is very straightforward if you understood the spcolor file, essentially it is the same concept.


In short, the file is made of fontSlots, which is very similar to the “name” in spcolor. For each of these fontSlot you can specify the font you would like to use based on the language of the user. You can erase all of the <s:font> lines that you do not plan on using but you cannot remove <s:ea> and <s:cs> as they are required by Composed Looks to work.

Then, you simply use the fontSlot in your CSS as we saw earlier.

/* [ReplaceFont(themeFont:"title")] */ font-family:”Segoe UI Light”,”Segoe UI”,”Segoe”,Tahoma,Helvetica,Arial,sans-serif;

In this scenario, my CSS specified the Segoe font family but it will be replaced with whatever is associated to “title” in my spfont file referenced by the active Composed Look.

The Preview file for the Master Page

If you recall, I copied a Master Page at the beginning of this article. Even if I had created my own Master Page, I would still need to copy a Preview file and rename it exactly like my Master Page to associate them together.

The preview file is used to make the Master Page available in the “Site layout” drop down when creating a Composed Look.

The preview file is split into the definition of CSS classes including the Color Palette and Font Palette that we want to use as well as some html to preview your design in the Composed Look window.

Creating the new Composed Look

All that is left for us to do is to put the files together into a Composed Look. We’re going to go back to the Site Settings under the Web Designer Galleries to modify or create a new Composed Look.


Click on New Item:


Enter all the necessary information to create a Composed Look.

The Image URL is for the background image that will be applied to the <body> html tag directly.

The next time you navigate to the “Change the Look” setting under you Site Actions or Site Settings you will have a new Composed Look available that will include your Master Page, CSS, Colors, Fonts and background image if it applies.

Deploy your Composed Look as a solution

SharePoint 2013′s Design Manager also offers a feature to Create a Design Package. This can be found under the Design Manager options in Site Settings.


There is a good MSDN article that covers this topic here:

This will create a WSP file for you to download and deploy in other Site Collections. The package includes all the custom files that we have created as long as you followed the instructions or warnings on the MSDN link above.


Download your file to your desktop or on a shared drive available to the team.


You can always check the content of the file by renaming it to a .cab file and exploring.


Navigate inside the Modules folder under files you will see that all your files have been packaged and ready to use as a WSP.


I hope that this opens your eyes to the possibilities that the Composed Looks can offer to your business. I know it definitely helped me understand the value a lot better when I started playing with my own Master Pages.

**UPDATE** Don’t forget to expect the Theme Slots tool to come out shortly for SharePoint


What does SharePoint 2013 mean to the Power Users?

You may also be interested in: Find and Move Files from anywhere to SharePoint with Skybrary


Editor’s note: Contributor Benjamin Niaulin is a SharePoint Specialist at Sharegate. Follow him @bniaulin

Recently, we have been gradually exposed to SharePoint 2013. I mean sure, you might have been one of the 10,000 attendees at the Conference in Vegas but have you taken the time to sit down and analyze what a migration to SharePoint 2013 would mean for you? Previously, in a SharePoint 2013 migration series I covered the different features and supported scenarios to help you get started. In this article, I want to focus on what SharePoint 2013 means to the Power Users.

It’s all just technology

If you are like me, you might get excited about the latest and greatest gadgets and features that come with a new version of a product. When SharePoint 2013 was announced I was looking at apps, the new Design Manager, how pages are coded, etc. However, to the Power Users in your company, it’s just another technology to help them do their job. And a big one that is bringing them a lot of work in fact. They are forced into the world of IT to provide solutions to the End Users. Columns, Tables, Site Columns, Web Parts, these are things they now have to learn and understand to provide the solution in SharePoint.

You can call it SharePoint 2013 now, it won’ t matter to them. They want a tool to help them do their job. SharePoint 2013 will only be good if it actually helps you increase the amount of work you do in the same amount of time it used to take you.

Why Power Users will love SharePoint 2013

I was lucky enough to speak at SharePoint Saturday St Louis on January 12th of 2013. My session was related to some of the benefits Search will bring to us. More specifically, the Content Search Web Part.

In short, the Content Search Web Part is the new and improved Content Query Web Part. If you don’t remember what that is, the CQWP allows you to query any content in your Site Collection and display it using reusable styles. It is one of the most powerful tools for a Power User in SharePoint 2007 and SharePoint 2010. Why? Because it allowed the Power User to provide no-code, reusable solutions throughout the company. The Content Search Web Part, takes it somewhere else. Instead of querying the Site Collection like the CQWP, it actually talks to Search directly. This means it has access to everything the SharePoint Search has been configured to Crawl.

The real power of the Content Search and the flexibility it provides

The real power of the Content Search Web Part is in its easy to use Query Builder and the Design Templates that go with it. You can learn more about that by downloading the slides I made available after the SharePoint Saturday.

Basically, it allows the Power User to build his own queries without knowing much about coding or managed properties. Ex: Get me all the blog posts in the company where the category is SharePoint. Or, Get me all the Tasks assigned to the user currently logged in. These are queries the Power User will now be able to build in just a few minutes.

Even better, it allows them to display the results using “Display Templates”. These are reusable HTML files that will give a look to the results of the query done above. It can show up as a slider, events calendar or even a full page. In SharePoint 2013, an entire page could be rendered as the result of a search on the logged in user.


Unfortunately, this is something that is only available in the On-Premise Enterprise version, though there is an expected release on Office 365. But I wouldn’t count on it in the less expensive plans

So what does this mean to our Power Users who need this Web Part to build Sites in just a few seconds? Well, you can actually do mostly everything with the Search Results Web Part. It allows you to build queries and use display templates as well. There are a few differences however. The Content Search Web Part was really built to make it easy on the Power User to manipulate the content that comes out of this Web Part.

Happy Power Users

During my session on the Content Search Web Part at the SharePoint Saturday, I could tell by the reactions of the Power Users in the room how helpful this will be for them. Creating a Query based on search and styling it without too much effort, perfect!

Of course there are a lot more features in SharePoint 2013 that will alleviate the work from Power Users to provide specific solutions using SharePoint to their Business Users. The message I am trying to convey in this article is to remember that SharePoint 2013 is nothing but a technology that helps your business run better. To do that, it needs to help the Business Users quickly and with the least amount of efforts possible. I believe there are a few features that will help you do that in SharePoint 2013.

Which feature do you think will give your Power Users an advantage?

Delay the Hover in SharePoint Dropdown Menus

You may also be interested in: O’Reilly - SharePoint 2010 at Work


Editor’s note: Contributor Benjamin Niaulin is a SharePoint Specialist at Sharegate. Follow him @bniaulin

If you have been using SharePoint for a while now inside your company’s Intranet, Extranet or even Public site, you may have found yourself cursing at the drop down menu.

Let me explain… See, every time a user’s cursor goes remotely close to the top navigation, also called the Global Navigation, the entire drop down menu appears. This can become very annoying; especially since most SharePoint Intranets have more than three sub menu items as show in my example above.

The speed of the community

In all honesty, I wasn’t even thinking about doing this article today. But I saw a question on twitter…

I decided to take it to another level and write an article on it to give everyone a chance to do this because it’s not as easy as it looks.

Again, it’s great to be able to engage with everyone revolving around SharePoint so quickly using tools like Twitter.

Let’s start by understanding

For this to work there are no shortcuts, we need to understand exactly what SharePoint does to override or change what happens on the screen. First things first, let’s cover the HTML and CSS. We understand that HTML is the structure and that CSS is the styling and positioning (if not more but let’s keep it simple) of the HTML.
If you are starting with all of these notions, a while back I had done a whole series on branding at the Power User level. These notions are necessary to understand what I am doing.

Branding Series on NothingButSharePoint

I am going to use my F12 trick to see what’s under the hood of this navigation.

F12 result:

This tells us that the entire navigation is a DIV with a class of “s4-tn” where “tn” represents “Top Navigation”. Fortunately, we will not need to use this today. What we need to discover is where the Dropdown is and how it is loaded. If you noticed in the screenshot above, every heading in the navigation are represented as LI (List Items) in a UL (Unordered List).

F12 result:

If we analyze the screenshot above, we can understand that each heading is a LI with a CSS class of “static”. However, if that heading has a dropdown menu it will also be using a class called “dynamic-children”.

Cool! We found you!

Now we know that if we want to play with anything related to SharePoint’s dropdown menus, we will need to look at what’s going on there. Already, we can see that each one has an A (anchor) and a UL with a class of dynamic.

The CSS Result needs to be analyzed

There are many ways to make a dropdown menu in the world of the web, the key for us lies in understanding which method is used by SharePoint to overwrite it or make it our own. Earlier, we figured out that each heading that has a dropdown can be identified with li.static.dynamic-children.

Wait a minute, that’s just the heading not the dropdown menu. Based on our research above, we can assume that the dropdown menu is the UL with the CSS class of dynamic we are looking for as well.



Let’s understand how the dropdown menu appears on our screens. How do we do this? Press F12 again, locate the dropdown menu container, in this case ul.dynamic, and see what it says.

What stands out from the other CSS only there to design the menu is shown above. SharePoint puts the dropdown menu container at -999em from the left of the screen. Obviously, this means no one sees it but it is there. We can assume that when we hover our mouse over the heading, SharePoint changes the position to the correct location. We need to figure out what that is. Unfortunately, I have not figured out how to do that with IE so I will use Chrome to show the rest.

See Chrome offers a “computed styles” to see everything applied on a single element using the same F12 view. I decided to take the heading and the dropdown menu container to compare their “computed styles” before and after I hover.

Heading Before Hover

Heading on Hover

If we look at what happened here, there are two new CSS properties applied.

The heading now has a position that is relative and a z-index of 100. But that’s not it, there is also a new class applied called “hover”. This isn’t good news, it means that SharePoint uses JavaScript to handle the dropdown menus and we are going to have to work with that to fix it as well.

Let’s look at the comparison between the dropdown menu’s CSS in viewing and hovered state now.

Dropdown menu container before Hover

Dropdown menu container on Hover

We can gather that the JavaScript adjusts the positioning of the dropdown menu so that it shows up on the screen at the right location.

My solution including the delay

I am going to using jQuery inside a regular Content Editor Web Part for this solution, remember this means that it will only work on a single page. If you want this to work everywhere, you will need to add the code in a JS file and reference it in your master page. I want to keep it simple for now.

Here is what I put in my HTML Source Editor:

<script src="/sites/benjamin/Style Library/jquery-1.8.3.min.js" type="text/javascript"></script><script type="text/javascript">
(function($) {
var timer;
$(document).ready(function() {
    $('li.static.dynamic-children').hover(function () {
        var li = $(this);
	li.css({ 'position': 'relative', 'z-index': '100' });
        li.find('ul.dynamic').css({ 'left': '-1px', 'top': '25px' });
        timer = setTimeout(function () {
        }, 800);
    }, function () {
	var li = $(this);
        li.css({ 'position': 'static', 'z-index': 'auto' });
        li.find('ul.dynamic').css({ 'left': '-999em' });

In a short description, I waited for the page to load to disable previous scripts on the items I chose (though it might not be necessary). I then changed the CSS so that my heading and its container is at the correct location but I quickly hide it. Once that is done, I tell it to wait 800 milliseconds before showing the dropdown menu using an animation. That is the trick for the delay, change that to any number you want. Finally, once the mouse leaves the heading I put everything back where it was.

If you want to change the timer, simply change the number 800 to anything you like. The advantage is that you can also use this to animate the dropdown menu. Notice I used “.show(‘fast’) in my code snippet. This helps you create a nice slide down effect on your dropdown menu instead of just seeing it popup on the screen.

Hope this helps.

Recording of “Understanding what’s in a SharePoint Site” webinar and some thoughts


Editor’s note: Contributor Benjamin Niaulin is a SharePoint Specialist at Sharegate. Follow him @bniaulin

To my surprise, the SharePoint Webinar I organized on “Understanding what’s in a SharePoint Site” got a lot of traction. Many comments on Mark Miller’s post about the SharePoint community were related around the fact that everyone has become so knowledgeable or technical that we tend to forget people are still starting with SharePoint. I took the ball and decided to do a Webinar that would cover the basics of what is in a site and really focus on understanding everything.


Based on the feedback and questions even after the webinar, I realized there is still a very strong need for information to be available for Power Users / End User. But it’s not just because of the Webinar, the many SharePoint Saturdays I have been attending has shown me the very same thing. Where it hit me, was at SharePoint Saturday Ottawa a few weeks back. I was presenting on the Content Query Web Part, very Power User in my opinion. Well, I was in the “Developer” track. And I thought about it, editing the itemstyle with XSLT and exporting the Web Part to change commonviewfields…. Hmm yeah I guess it’s very advanced, perhaps considered developing for many. But, I have been doing this for so long that I considered it “basic” and didn’t understand at first why I was in that track. That’s what happens to many I think, we tell ourselves “Well I won’t write about that, I did it for SharePoint 2007 already” or “Everyone knows what a Site Column is, I’ll assume they do and continue”. Fact is, many do not. It’s important to continue providing a source of information for everyone and not forget the Power Users and End Users.
I will try to make these kind of Webinars available more often – based on “Understanding the SharePoint basics” and make it always available so everyone can participate.

Here is the video recording:

Presentation available:

Thank you

Again, thank you to everyone that participated and took the time to fill out the survey at the end. The feedback was amazing and it helps me want to do many more like these. Some key takeaways was that there might have been too much information squeezed into such a short time and not enough time for Q&A. I will take that into consideration for the next one.

Feel free to leave suggestions for next topics, what would you like to see covered?

Leave a comment below.

What’s in a SharePoint Site? Understand the Basics Webinar


Editor’s note: Contributor Benjamin Niaulin is a SharePoint Specialist at Sharegate. Follow him @bniaulin

As a follow to Mark Miller’s article on the Evolution of Community in SharePoint I decided to organize a free Webinar to cover the basics of SharePoint. I realized through my travels in various SharePoint events like SharePoint Saturdays and large Conferences that many are just beginning with SharePoint. We have been working with SharePoint for so long that we tend to forget that some are not yet so comfortable with “site columns” or “content types”.

As a first step I would like to set up a Webinar on Wednesday December 5th 2012 at 1:30pm as a first in a series of Webinars on NothingButSharePoint to cover some of the basics of SharePoint geared to End Users and Power Users.


The Webinar (Dec 5th)

What’s in a SharePoint Site? Understand the basics. Filled with demos alongside the presentation.

What’s in the box? How do you use it and why? In this webinar, we will go over the objects that make up a SharePoint Site. When starting in SharePoint, we often don’t realize the importance of our architecture. Should you create a Site per Project or a page per Project?

A quick overview of SharePoint as seen from the top. A focus on what a Site Collection is from the perspective of a Power User.

SharePoint Sites
What’s a SharePoint Site and what are the differences between each “Templates”. In this section we will demystify what a site actually is. A big part of understanding SharePoint is understanding the terminology associated and used with it.

Lists and Libraries
We will then cover lists and libraries in a SharePoint site. We will cover the differences between each templates as well as some of the “I wish I knew that before” options available.

Columns and Site Columns
Have you ever heard of a Site Column before in SharePoint? If the answer is no or you are not really using them, then you should definitely attend this webinar and see the advantages it offers.

Content Types
A brief introduction to Content Types to understand what they are but this is a webinar on its’ own. We will cover this in detail as a follow up in early 2013.

Web Parts
Here we will go over some of the popular Web Parts used in SharePoint. We will of course start by explaining what they are and how to apply basic configurations.

What’s the difference between a Wiki Page, a Web Part Page and a Publishing Page? Understand how pages are used and when to use them in SharePoint.

Register quickly

Although I do not believe it will be an issue, I can only host 250 attendees for this Webinar.

Registration Link:

Feel free to get in touch with me on Twitter @bniaulin for any questions.