Documentation
¶
Overview ¶
Package styles defines the visual styling for dodot's terminal output.
All styles use semantic names and adaptive colors that automatically adjust to light and dark terminal themes. This centralized approach ensures consistent theming across all command outputs.
Style names are used as XML-like tags in templates:
<Success>Operation completed</Success> <Handler>symlink</Handler>
See pkg/output/doc.go for the complete rendering pipeline documentation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var StyleRegistry map[string]lipgloss.Style
StyleRegistry maps semantic names to lipgloss styles
Functions ¶
func LoadStyles ¶
LoadStyles loads style configuration from a YAML file
func LoadStylesFromData ¶ added in v0.3.1
LoadStylesFromData loads style configuration from byte data
func MergeStyles ¶
MergeStyles combines multiple styles
Types ¶
type Config ¶
type Config struct {
Colors map[string]ColorDef `yaml:"colors"`
Styles map[string]StyleDef `yaml:"styles"`
}
Config represents the complete styles configuration
type StyleDef ¶
type StyleDef struct {
Bold bool `yaml:"bold,omitempty"`
Italic bool `yaml:"italic,omitempty"`
Underline bool `yaml:"underline,omitempty"`
Foreground string `yaml:"foreground,omitempty"`
Background string `yaml:"background,omitempty"`
Width int `yaml:"width,omitempty"`
Align string `yaml:"align,omitempty"`
MarginLeft int `yaml:"marginLeft,omitempty"`
MarginBottom int `yaml:"marginBottom,omitempty"`
MarginTop int `yaml:"marginTop,omitempty"`
PaddingLeft int `yaml:"paddingLeft,omitempty"`
PaddingRight int `yaml:"paddingRight,omitempty"`
}
StyleDef represents a style definition in YAML