feat: Miaou 0.4.0 - Cascading style system and built-in themes#111
Merged
mathiasbourgoin merged 2 commits intomainfrom Feb 18, 2026
Merged
feat: Miaou 0.4.0 - Cascading style system and built-in themes#111mathiasbourgoin merged 2 commits intomainfrom
mathiasbourgoin merged 2 commits intomainfrom
Conversation
017c520 to
a097ded
Compare
a097ded to
382196a
Compare
1b626cb to
e6c4927
Compare
d0225db to
ed46b5c
Compare
- Box_widget border style: added None_ for borderless containers. Pattern matches on border_style may need a new case. - Cascading style system with semantic styles and CSS-like selectors - Theme JSON support with discovery/merge rules and contrast validation - Effect-based Style_context for runtime theme access - Built-in themes: catppuccin, dracula, nord, gruvbox, tokyonight, opencode, oled - Theme registry API: list_builtin(), get_builtin(), load_any() - Textarea widget: multiline text input with cursor navigation - Foldable list widget: collapsible sections in gallery - Left-bordered box: context/quote blocks with colored border - Blocks spinner: animated spinner with gradient trail - Alt+Enter key parsing for textarea newlines - Mouse helper module with click, drag, wheel utilities - Mouse support for: Pager, Select, File Browser, Textbox, Textarea, Tabs, Breadcrumbs, Button, Link, Checkbox, Radio, Switch - Signal handling control via handle_sigint option - Per-side border colors for Box_widget - Canvas themed rendering with to_ansi_with_defaults - Theme dark_mode field for adaptive color resolution - Widget theming: all widgets use semantic themed styles - Containers fill contextual backgrounds across full width - Drivers apply themed foreground/background automatically - Theme JSON parsing: tolerant of partial objects, multiple color formats - Matrix driver: reduced flicker during periodic scrub - Terminal raw mode: proper SIGINT handling - Modal backgrounds: correct theming in light/dark modes Co-Authored-By: Claude <noreply@anthropic.com>
ed46b5c to
e2693b3
Compare
e2693b3 to
9adc787
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Major release adding a comprehensive theming system with CSS-like selectors and 11 built-in themes.
Style System (
miaou_style)Style_contextfor runtime theme accessBuilt-in Themes
11 popular themes included directly in the library:
opencodeandoleduse borderless style for a clean, minimal lookoledfeatures true black background for OLED screensTheme Registry API
Builtin_themes.list_builtin()- list all themes with metadataBuiltin_themes.get_builtin(id)- load a theme by IDTheme_loader.load_any(name)- smart loading (built-in first, then user)New Widgets
Mouse Support
Wheel scrolling and click handling for: Pager, Select, File Browser, Textbox, Textarea, Tabs, Breadcrumbs, Button, Link, Checkbox, Radio, Switch
Other Features
dark_modefield in Theme.t for adaptive color resolutionto_ansi_with_defaultshandle_sigintoptionBreaking Changes
Box_widget.border_stylenow includesNone_for borderless containersTesting
dune build && dune runtestdune exec example/demos/style_system/main.exe