Skip to content

Instantly share code, notes, and snippets.

@GLMeece
Last active March 23, 2017 03:53
Show Gist options
  • Select an option

  • Save GLMeece/7d5241673d96b132f0219cf97c6765c9 to your computer and use it in GitHub Desktop.

Select an option

Save GLMeece/7d5241673d96b132f0219cf97c6765c9 to your computer and use it in GitHub Desktop.
CSS Tweaks for Robot Framework's documentation tools (the testing reports, LibDoc and TestDoc)

CSS Tweak

If you wish to tweak the CSS in the reports, you'll probably want to modify the Python Lib directory's robot/htmldata/rebot/common.css file (for Linux, this is usually located in /usr/local/lib/python2.7/dist-packages; in Windows it's usually C:\Python27\Lib\site-packages). I prefer the Open Sans font, so I add the following at the top of this file:

@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,400italic,700,700italic);

Then, I replace 'Helvetica' with 'Open Sans' in the body's font-family declaration.

Additionally, the same can be done for the libdoc tool. As per the instructions above, find the CSS file at robot/htmldata/libdoc/libdoc.css. Taking a cue from our example above, add the CSS shown above as the first line. In the body section, change this line:

font-family: sans-serif;

to this:

font-family: 'Open Sans', sans-serif;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment