December 13, 2016, 10:44 am - James Farrer
In ServiceNow and Service Portal there are some great features in a lot of places. There are, however, a number of rough edges since it's still pretty new. One of the places that I've found is a little rough is with the CSS. Many of the default widgets delivered by ServiceNow use the bootstrap panel structure. This gives a pretty nice format for setting up blocks with headings.
The problem is that most of the brand colors are not supported. It instead uses the default Bootstrap colors. The solution to this is to add the following styles to the widget CSS. It could also be added to the page CSS if you don't want to modify the widget.
This code utilizes the brand colors set in the Branding Editor to apply the colors.
/* add styles to support brand colors in basic panels */ .panel-danger > .panel-heading { color: $panel-bg; background-color: $brand-danger; border-color: $brand-danger; } .panel-warning > .panel-heading { color: $panel-bg; background-color: $brand-warning; border-color: $brand-warning; } .panel-success > .panel-heading { color: $panel-bg; background-color: $brand-success; border-color: $brand-success; } .panel-info > .panel-heading { color: $panel-bg; background-color: $brand-info; border-color: $brand-info; }