coalition.content.theme_service =============================== .. py:module:: coalition.content.theme_service .. autoapi-nested-parse:: Theme service for generating dynamic CSS and managing theme-related operations. Classes ------- .. autoapisummary:: coalition.content.theme_service.ThemeService Module Contents --------------- .. py:class:: ThemeService Service for theme-related operations and CSS generation .. py:method:: get_theme_css_response(theme: coalition.content.models.Theme | None = None) -> django.http.HttpResponse :staticmethod: Generate a CSS HttpResponse for a theme. :param theme: Theme instance. If None, uses the active theme. :returns: HttpResponse with CSS content type .. py:method:: generate_theme_css(theme: coalition.content.models.Theme) -> str :staticmethod: Generate complete CSS for a theme including variables and custom CSS. :param theme: Theme instance :returns: Complete CSS string .. py:method:: generate_utility_classes() -> str :staticmethod: Generate utility CSS classes that use theme variables. These provide easy-to-use classes for common theming needs. .. py:method:: get_theme_for_homepage(homepage: coalition.content.models.HomePage) -> coalition.content.models.Theme | None :staticmethod: Get the effective theme for a homepage. :param homepage: HomePage instance :returns: Theme instance or None .. py:method:: apply_theme_to_component_props(theme: coalition.content.models.Theme | None) -> dict :staticmethod: Generate props dictionary with theme values for React components. :param theme: Theme instance or None :returns: Dictionary with theme properties