Skip to content

Commit bb8f706

Browse files
Merge pull request SharePoint#9224 from meganbradley/patch-1
wrapped head tags in code so they aren't stripped from output
2 parents b7dcda3 + be2ddb1 commit bb8f706

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

docs/general-development/how-to-create-a-page-layout-in-sharepoint.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ If you're using Design Manager to create page layouts and master pages, the most
9898
- **PlaceHolderMain** The master page contains a content placeholder with `ID="PlaceholderMain"`, which contains the **DefaultContentBlock** `<div>` tag with the yellow box that shows **This area will be filled in by content you create in your page layouts.** You should not put any content inside this placeholder on the master page. The page layout contains a content placeholder with the same ID. You should put markup only inside this placeholder, and put no markup outside this placeholder, on a page layout. The IDs for the two placeholders ( **PlaceholderMain**) should match.
9999

100100

101-
- **PlaceHolderAdditionalPageHead** When you work with a page layout, you typically don't insert elements into the **<head>** tag of the page layout. Instead, you add elements to the content placeholder with `id="PlaceHolderAdditionalPageHead"`. When a content page is rendered in the browser, this additional page head gets merged into the end of the head of the master page.
101+
- **PlaceHolderAdditionalPageHead** When you work with a page layout, you typically don't insert elements into the `<head>` tag of the page layout. Instead, you add elements to the content placeholder with `id="PlaceHolderAdditionalPageHead"`. When a content page is rendered in the browser, this additional page head gets merged into the end of the head of the master page.
102102

103103

104104

@@ -184,7 +184,7 @@ When you create HTML mockups for your site, you may have HTML files that represe
184184

185185

186186

187-
You can simply put the styles for one or more page layouts into the same style sheet that the master page links to. But, if you want to minimize the weight of the CSS that is loaded per page, you can also use different style sheets for different page layouts. When you do this, it's important to know that a link to a style sheet cannot go in the **<head>** tag of a page layout. Instead, the link must go in the content placeholder named **PlaceHolderAdditionalPageHead**.
187+
You can simply put the styles for one or more page layouts into the same style sheet that the master page links to. But, if you want to minimize the weight of the CSS that is loaded per page, you can also use different style sheets for different page layouts. When you do this, it's important to know that a link to a style sheet cannot go in the `<head>` tag of a page layout. Instead, the link must go in the content placeholder named **PlaceHolderAdditionalPageHead**.
188188

189189
> [!NOTE]
190190
> In this markup, the attribute `ms-design-css-conversion="no"` excludes the style sheet from theming. Also, the link to the style sheet should appear after the lines commented **<!--SPM**.

docs/general-development/how-to-make-custom-css-files-themable-in-sharepoint.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Make custom CSS files themable in SharePoint
33
description: Learn how to add comment-style markup to a CSS file so that it can be used in the SharePoint theming engine.
4-
ms.date: 06/13/2022
4+
ms.date: 09/28/2023
55
ms.assetid: b8c82c77-c836-47f9-a11e-6c9c656d436b
66
ms.localizationpriority: high
77
---
@@ -103,7 +103,7 @@ CSS files must be checked in and published. If CSS files are changed, you must r
103103

104104
## Register the CSS file
105105

106-
You must register the CSS file with a master page before the CSS file can be used by the theming engine. This directs the master page to the CSS file when you apply a theme to a site. To register a CSS file, you add a **\<SharePoint:CssRegistration\>** element to the **<head>** element of the master page. The following shows the format of the **\<SharePoint:CssRegistration\>** element.
106+
You must register the CSS file with a master page before the CSS file can be used by the theming engine. This directs the master page to the CSS file when you apply a theme to a site. To register a CSS file, you add a **\<SharePoint:CssRegistration\>** element to the `<head>` element of the master page. The following shows the format of the **\<SharePoint:CssRegistration\>** element.
107107

108108
```HTML
109109
<SharePoint:CssRegistration Name="CSSFileLocation" runat="server" />
@@ -130,5 +130,4 @@ The following is an example of an **\<SharePoint:CssRegistration\>** element.
130130
- [Upgrade custom themes and CSS to SharePoint](upgrade-custom-themes-and-css-to-sharepoint.md)
131131
- [How to: Create a master page preview file in SharePoint](how-to-create-a-master-page-preview-file-in-sharepoint.md)
132132
- [Color palettes and fonts in SharePoint](color-palettes-and-fonts-in-sharepoint.md)
133-
- [SharePoint Team Blog: Show off your style with SharePoint theming](https://www.microsoft.com/microsoft-365/blog/2012/10/29/show-off-your-style-with-sharepoint-theming/)
134133
- [SharePoint Design Manager branding and design capabilities](sharepoint-design-manager-branding-and-design-capabilities.md)

0 commit comments

Comments
 (0)