The culprit was the Ektron blog CSS. Ektron is smart enough to only load the CSS required for a particular page. So when the BlogEntries control was added, the Ektron CSS URL changed from something like-
Whilst it is admirable of Ektron to try to reduce your page load, the problem with this is twofold-
- Using XSLT, I have no requirement of the Ektron CSS.
- The Ektron CSS is at times terrible.
Here, in particular, is the offensive piece of CSS in the \Workarea\csslib\blogs.css
p, li, div
font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;
Dear CSS designers of the world, imagine for a second that you had the following CSS forced upon you by a developer. You would go spare trying to override it. Maybe you could use “inherit” and “!important” to work around it, but either way it’s a lot of work.
So, we had a previously fine page suddenly rendered ugly by the choice of Ektron server control. Our options to solve this are-
- Workaround the CSS. As mentioned above, this is quite laborious, and be sure to budget for rehab for your CSS developers.
- Delete the offending code. Main problem with this is to remember to re-delete upon upgrading Ektron. If it’s just one bad CSS snippet that’s not too bad. Also, you need to take responsibility for any side-effects of deleting this. For a blog control, this will be minimal, but overriding some of the horrible widget and Page Builder CSS will make the in-page editing ugly or unusable.
- Rebuild the control without using the blog control. This may mean re-implementing functionality which is normally out-of-the-box from Ektron.
- Improving their CSS. Mainly by removing loosely scoped selectors.
- Add a DisableCSS property to server controls, effectively giving the developer the chance to say “Leave it Ektron, I’ll take care of the CSS for this control”.
- The improved framework API and MVC/MVP style controls would offer viable alternatives, though there is nothing stopping Ektron injecting CSS for these controls.
We’re still weighing up our options, but it looks like we’ll rebuild the control without using the BlogEntries control. A half-hour implementation has become a four-hour implementation, and CSS that I do not want nor need has been force feed to my site visitors.