swissvotes.theme.swissvotes_theme ================================= .. py:module:: swissvotes.theme.swissvotes_theme Classes ------- .. autoapisummary:: swissvotes.theme.swissvotes_theme.SwissvotesTheme Module Contents --------------- .. py:class:: SwissvotesTheme(compress: bool = True) Bases: :py:obj:`onegov.foundation.BaseTheme` Base class for Zurb Foundation based themes. Use this class to create a theme that customizes Zurb Foundation somehow. If you don't want to customize it at all, use :class:`Theme`. To customize start like this:: from onegov.foundation import BaseTheme class MyTheme(BaseTheme): name = 'my-theme' version = '1.0' You can then add paths with your own scss files, as well as imports that should be added *before* the foundation theme, and imports that should be added *after* the foundation theme. Finally, options passed to the :meth:`compile` function take this form:: options = { 'rowWidth': '1000px', 'columnGutter': '30px' } Those options result in variables added at the very top of the sass source before it is compiled:: @import 'foundation/functions'; $rowWidth: 1000px; $columnGutter: 30px; If your variables rely on a certain order you need to pass an ordered dict. .. py:attribute:: name :value: 'onegov.swissvotes.foundation' The name of the theme, must be unique. .. py:property:: pre_imports :type: list[str] Imports added before the foundation import. The imports must be found in one of the paths (see :attr:`extra_search_paths`). The form of a single import is 'example' (which would search for files named 'example.scss') .. py:property:: post_imports :type: list[str] Imports added after the foundation import. The imports must be found in one of the paths (see :attr:`extra_search_paths`). The form of a single import is 'example' (which would search for files named 'example.scss') .. py:property:: extra_search_paths :type: list[str] A list of absolute search paths added before the actual foundation search path.