I would like to insert a piece of CSS to a Page Layout, to let it style the page but only when it is in the editing mode. Is there anyway to achieve that? I know there is a Editing mode Panel, but how could I insert CSS to it?
Version = 2013
<asp:Content contentplaceholderid="PlaceHolderAdditionalPageHead" runat="server">
<PublishingWebControls:EditModePanel runat="server">
<!-- with the built-in control -->
<SharePoint:CssRegistration Name="somepath/somecss.css" runat="server" />
<!-- classic -->
<link href="<%$ SPUrl:~siteCollection/somepath/somecss.css %>" type="text/css" rel="stylesheet" />
<!-- inline -->
<style>
#sideNavBox {
display: none;
}
#contentBox {
margin: 0;
}
</style>
</PublishingWebControls:EditModePanel>
</asp:Content>