Customizing Look and Feel
This chapter describes how SharePoint composed looks are utilized as a means to customizing look and feel of MatchPoint Snow.
About Composed Looks
SharePoint 2016 provides composed looks as a built-in functionality to configure the look and feel of a site. This section gives a general introduction to composed looks with SharePoint and provides information on how to apply a composed look to a SharePoint site.
Definition
A composed look consists out of following elements (files):
.master
: a SharePoint master page that defines the structure of all pages within a SharePoint site as well as the elements/controls used within the site..spcolor
: an spcolor file that contains a set of colors used within the composed look..spfont
: an spfont file that contains font names used within this composed look.
In order for a composed look to be applied to a site, these resources need to be deployed to the site collection.
Next to these resources, a composed look also has to be defined within
the "Composed Looks" gallery (_catalogs/design
). Within this SharePoint
list, the elements (.master
, .spcolor
, .spfont
) are combined to a
composed look. Once a composed look is defined within the gallery, a
site collection administrator can apply it to a site.
Please note that within the "Composed Looks" gallery, elements can be freely combined in order to create new composed looks, if required.
Applying a Composed Look
A composed look can either be applied manually by using the "Change the
look" action within the site settings page
(_layouts/15/designgallery.aspx
) or via code using the SPTheme
class.
Please note that that the SPTheme class only applies .spfont
and
.spcolor
files. It doesn't apply the master page. This needs to be set
using SPWeb.CustomMasterUrl
or SPWeb.MasterUrl
, respectively.
Once a composed look is applied, any themable css files are searched for replacement tokens, which are then replaced with the values specified within the .spcolor and .spfont files.
For more information on composed looks and themes, please consult MSDN: Themes overview for SharePoint 2016
MatchPoint Snow Composed Look
The following section describes how composed looks can be configured for MatchPoint Snow.
Definition
MatchPoint Snow uses a composed look called "MP Snow Look". This composed look consists out of following files (which are deployed using SharePoint features as specified):
- /_catalogs/masterpage/mpsnow.master
deployed by the hidden feature "MatchPoint Snow Composed Look"
(
fd87c5c9-7047-4e98-955b-2f1d364a13ba
) - /_catalogs/theme/15/mpsnow.spcolor
- /_catalogs/theme/15/mpsnow.spfont
deployed by the hidden feature "MatchPoint Snow Theme"
(
0e21bf73-97ed-45de-8df9-9c736ffefb8b
)
Activation
Within MatchPoint Snow, the features (and thereby the MatchPoint Snow composed look) is activated in different ways:
- On the MatchPoint Snow root site, the features are enabled with
feature
Colygon.MatchPoint.Snow
. - On any Snow workspaces, the composed look is activated by the
provisioning template
MPSnow.Workspaces.BaseProvisioning.xml
. (This is one reason to use this template for custom workspaces). - On custum Snowflake sites, the feature needs to be activated by the implementing partner either manually or via code, for example in a feature receiver.
Creating an own Composed Look
In order to create an own composed look to be used within MatchPoint Snow, the master page needs to be used. Colors can be defined within a new .spcolor file or an existing .spcolor file can be reused. Likewise, fonts can be defined either within a new .spfont file or by reusing an existing .spfont file.
The mpsnow.spcolor
file provides some short comments that describe where
a specific color will be used within the MatchPoint Snow CSS styles.