Plugin Developer Discussion

Discussion for FogBugz Plugin developers

Adding Style Sheets

I've read the article "Implementing IPluginStaticCSS", and this seems relevant for including style sheets for plug-in pages, but still can't determine the best way to add a style-sheet containing classes that I want to reference in custom HTML I am injecting via the  IPluginBugEventDisplay.BugEventDisplay.
John Fuex Send private email
Monday, June 29, 2009
An alternative is to just inline your CSS or use style tags...

<STYLE TYPE="text/css">
  H1 { font-size: x-large; color: red }
  H2 { font-size: large; color: blue }

Seems to me that the main advantage of having external (static) style sheet is if in fact you want to change your styles after you deploy the plugin.

Otherwise embeded or inline CSS should work fine.
Martin Zardecki Send private email
Monday, June 29, 2009
Styles send down in StaticCss should be usable on any page in FogBugz (not just plugin pages).  If your CSS is not static, you can inline it as Martin said.

The main advantage to using StaticCss is that inline CSS has a big impact on page render speed, and static CSS files can be cached by the browser.
David Fullerton Send private email
Tuesday, June 30, 2009
Thanks for the help.

I used the following implementation and it worked as promised. The referenced css file was available from the html generated in the bug and bugevent display HTML event handlers.

public string[] StaticCSSFiles()
            return new string[] { "css/sample.css" };
John Fuex Send private email
Tuesday, June 30, 2009

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz