How do you disable a CSS include on a custom UI Page

David Sprowls
Tera Contributor

I have a custom UI page I have created and I have my own CSS I want to use for his page but this css... <link type="text/css" href="/styles/css_includes.cssx?v=06-17-2014_1527&amp;c=04-24-2013_15:52:34_19330a326856e5006b96a676065a03..." rel="stylesheet"></link>

 

Is loading in my page automatically. Is there somewhere I can disable this from loading at all into my custom UI page only?

1 ACCEPTED SOLUTION
11 REPLIES 11

adiddigi
Tera Guru

I'm sorry I don't understand. Why you want the CSS to not load if you have included it to run?


Basically what I have is a UI action on a form that loads a UI Page I have created which I am using as a way to create a nice formatted printable page of the form. Since the UI Page form doesn't have a place to link a local Stylesheet, I embedded my CSS in the HTML of my UI Page. When I click the UI Action on my form my UI page loads, but some of my styles are not rendering as expected because the CSS I mentioned previously linked in the Head of my UI page. This is generated by SN, not the code in my UI page. I know when you create a page in the CMS you can link a theme and create local style sheets there but I don't see similar options on a UI page.


You can link your UI page to a custom style sheet by adding the following tag to your UI page.   You can check out this article for more info - http://www.servicenowguru.com/content-management/custom-stylesheets-noncms-pages/



<link href="STYLE SHEET SYS_ID.cssdbx?" rel="stylesheet" type="text/css"/>




That's a nice idea to use for knowledge but when I do this on a UI Page, SN still loads a default stylesheet and embeds my linked style sheet in the body.



I'm thinking this is, or should be, a system property to define what pages exclude the base stylesheet.



In the mean time I'm just going to write additional CSS declarations to work around some of the base styles I don't want on this page.