Styling Slides


  • Slides are contained in <article> elements
  • Each slide has an HTML id that corresponds to the permalink ID generated by Sphinx (for example, you’re currentling reading styling).
  • The heading level is added as a class; ie, level-2
  • Slides may be styled using a theme, or custom CSS.

Included Themes

Hieroglyph includes two themes.


Two slides levels: the first level of headers become “section” headers, and the second become the real content.


Only one style of slide, every slide has a title at the top.

Setting the Theme

You can set your theme using the slide_theme configuration setting.

slide_theme = 'single-level'

If you’re using a custom theme, you can also set the directory to look in for themes:

slide_theme_path = '...'

Custom CSS

The standard Hieroglyph themes support adding a custom stylesheet with the slide_theme_options dict in

slide_theme_options = {'custom_css':'custom.css'}

The custom CSS file should be located in the html_static_path (_static by default).

Creating Themes

Hieroglyph themes are based on Sphinx’s HTML themes. Themes are either a directory or zipfile, which contains a theme.conf file, templates you wish to override, and a static/ directory which contains images, CSS, etc.

When defining a slide theme, inherit from the slides theme for basic support. For example, the single-level them has the following theme.conf:

inherit = slides
stylesheet = single.css

custom_css =

In order to include the base slide styling, your theme’s stylesheet should begin with:

@import url(slides.css);

slides.css will be supplied by the base theme (slides).

See the Sphinx documentation for themes for more information.

Project Versions

Table Of Contents

Previous topic

Getting Started with Hieroglyph

Next topic

Advanced Usage

This Page