Created a new, blank website template, but many CSS rules automatically injected--from where?
I just created a completely blank website template. Here's my master file:
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="Templatev1.master.cs" Inherits="App_Master_Templatev1" %>
<!DOCTYPE html>
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
></
title
>
<
asp:ContentPlaceHolder
id
=
"head"
runat
=
"server"
>
</
asp:ContentPlaceHolder
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
div
>
<
asp:ContentPlaceHolder
id
=
"MainContentPlaceHolder"
runat
=
"server"
>
</
asp:ContentPlaceHolder
>
</
div
>
</
form
>
</
body
>
</
html
>
As you can see, there is nothing in there. I registered my website template in the Sitefinity web backend, created a page, dropped a single content block on it, and confirmed that I can view the page and my "blank" template is used. However, there are quite a few styles that are automatically being applied. The URL for the stylesheet is
/Telerik.Web.UI.WebResource.axd?d=Dqenvxc1cdbN6iiBXWhj6fKQNBAZH57yzRyI_nMgkcBf68bKAySPKIlkWVCGbGsrnuBhcyCqhfrYkeKPjmjcii0ghMUs17KAclTbsjnJ3FWmZ6ZUd4Qh0GlBICxqFvfNjEeev16j403640VcY-i7pA2&t=635823524460000000&compress=0&_TSM_CombinedScripts_=%3b%3bTelerik.Sitefinity.Resources%2c+Version%3d8.1.5800.0%2c+Culture%3dneutral%2c+PublicKeyToken%3db28c218413bdf563%3aen%3af7a2bcfd-9e00-4417-96fe-66024fe072ff%3a4a0e9096%3a68ef0189%3ad271177c%3adff30785
You can see all the styles in this pastebin.
What are these styles for? Am I required to have them? Can I get rid of them, and if so, how? For the purposes of this template I would like to declare styles myself (and only my on styles). In other words, I don't want any styles that I haven't explicitly decided to include in the template. Is this possible? Will this cause problems for Sitefinity?
-Josh
Followup on this: I contacted Telerik support, and they indicated that these styles are only injected if the current user has permission to use the in-line editing tool. However, I've found this not to be the case--even if I open a new incognito window in Chrome and pull up the page, those styles are getting injected.
And, unfortunately, they are conflicting with styles that we're trying to apply to our template, and/or applying styles to elements we don't want styled.
Any advice? How can I keep Telerik from "stomping" on my styles?
Hi Joshua,
If you go to the Design > Page Tempaltes and select the template of the page to edit it.
You should then see the page layout, on the right hand side up the top you should see a button called theme.
Click this and apply your theme. If you don't have a theme you can select none.
This got me until I figured it out.
Thanks for the feedback! I figured this out on Friday but hadn't made it back to the forums to report my finds. Yes, assigning the theme to either blank, or your own theme (I did the latter) is the solution. If you leave the theme on "basic" you'll wind up with Sitefinity's "basic" styles.
-Josh