theme

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockOverrideStyle

func BlockOverrideStyle(cfg *config.Config, light, dark ThemeColors) string

BlockOverrideStyle builds the inline style declarations for a per block theme override. Light values are emitted as --kz-ovl-* and dark values as --kz-ovd-*; the kz-themed rules generated by TokenSwitchingCSS map them back onto the regular --kz-* variables. Returns an empty string when the light theme colors are unusable.

func GenerateVars

func GenerateVars(cfg *config.Config, light, dark ThemeColors) string

func ThemeToggleCSS

func ThemeToggleCSS(cfg *config.Config, light, dark ThemeColors) string

ThemeToggleCSS generates CSS rules for per-block theme toggling. These rules use data-kz-theme="dark"|"light" on .kazari-block to override the page-level theme for individual blocks.

func TokenSwitchingCSS

func TokenSwitchingCSS(cfg *config.Config) string

TokenSwitchingCSS generates the color switching rules for token spans.

Types

type ThemeColors

type ThemeColors struct {
	EditorBG     string
	EditorFG     string
	SelectionBG  string
	LineNumberFG string
	FoldBG       string
}

ThemeColors holds colors extracted from a syntax theme.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL