Skip to main content

scrybe_render/
theme.rs

1// SPDX-License-Identifier: Apache-2.0
2// Copyright 2026 Shawn Hartsock and contributors
3
4//! Render themes — fresh CSS, not MacDown's stylesheet.
5
6/// Available render themes.
7#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
8pub enum Theme {
9    #[default]
10    Default,
11    Dark,
12    Solarized,
13}
14
15impl Theme {
16    /// Returns the CSS string for this theme.
17    pub fn css(&self) -> &'static str {
18        match self {
19            Self::Default => include_str!("themes/default.css"),
20            Self::Dark => include_str!("themes/dark.css"),
21            Self::Solarized => include_str!("themes/solarized.css"),
22        }
23    }
24}