Task 16: Theme tokens, fonts, icons (fluxer-ui::theme, xtask gen-theme) #16

Closed
opened 2026-11-11 08:01:25 +00:00 by charles · 0 comments
Owner

Files:

  • Create: xtask/src/gen_theme.rs, crates/fluxer-ui/src/theme/{mod.rs,tokens.rs (generated),palette.rs,fonts.rs,icons.rs}, crates/fluxer-ui/assets/fonts/ (copied from fork:packages/fonts/files/FluxerSans*, FluxerMono* with fork:packages/fonts/LICENSE-IBM-PLEX.txt and NOTICE.md), crates/fluxer-ui/assets/icons/ (SVGs the Foundation screens use, copied from the web app)
  • Test: crates/fluxer-ui/tests/theme.rs, xtask/tests/gen_theme.rs

Interfaces:

  • Produces: cargo xtask gen-theme --fork <path> parses fork:fluxer_app/src/features/theme/styles/generated/color-system.css (:root, .theme-dark block) and fork:fluxer_app/src/app/globals.css (--radius-*, --spacing-*, --layout-*) and message-layout.css into tokens.rs: pub struct Tokens { pub colors: Colors, pub radii: Radii, pub spacing: Spacing, pub layout: Layout } with pub const DARK: Tokens. HSL strings with calc(var(--saturation-factor) * N%) resolved with factor 1; var(--instance-brand-primary, hsl(242,70%,55%)) resolves to the fallback. Layout { guild_list_width: 72.0, sidebar_width: 320.0, header_height: 56.0, member_list_width: 264.0, message_avatar: 40.0, message_gutter: 12.0, message_line_height: 22.0, guild_icon: 44.0, guild_item_box: 48.0 }.
  • fonts::load() -> Vec<Cow<'static, [u8]>> for iced .font(); FONT_SANS: Font = Font::with_name("Fluxer Sans"), FONT_MONO. icons::svg(name: IconName) -> iced::widget::svg::Handle (static includes).
  • palette::Theme implementing iced's theme/catalog traits from DARK.

Plan: https://git.forked.io/charles/fluxer-native/src/branch/foundation/docs/superpowers/plans/2026-11-11-foundation.md (section "Task 16")

**Files:** - Create: `xtask/src/gen_theme.rs`, `crates/fluxer-ui/src/theme/{mod.rs,tokens.rs (generated),palette.rs,fonts.rs,icons.rs}`, `crates/fluxer-ui/assets/fonts/` (copied from `fork:packages/fonts/files/FluxerSans*`, `FluxerMono*` with `fork:packages/fonts/LICENSE-IBM-PLEX.txt` and `NOTICE.md`), `crates/fluxer-ui/assets/icons/` (SVGs the Foundation screens use, copied from the web app) - Test: `crates/fluxer-ui/tests/theme.rs`, `xtask/tests/gen_theme.rs` **Interfaces:** - Produces: `cargo xtask gen-theme --fork <path>` parses `fork:fluxer_app/src/features/theme/styles/generated/color-system.css` (`:root, .theme-dark` block) and `fork:fluxer_app/src/app/globals.css` (`--radius-*`, `--spacing-*`, `--layout-*`) and `message-layout.css` into `tokens.rs`: `pub struct Tokens { pub colors: Colors, pub radii: Radii, pub spacing: Spacing, pub layout: Layout }` with `pub const DARK: Tokens`. HSL strings with `calc(var(--saturation-factor) * N%)` resolved with factor 1; `var(--instance-brand-primary, hsl(242,70%,55%))` resolves to the fallback. `Layout { guild_list_width: 72.0, sidebar_width: 320.0, header_height: 56.0, member_list_width: 264.0, message_avatar: 40.0, message_gutter: 12.0, message_line_height: 22.0, guild_icon: 44.0, guild_item_box: 48.0 }`. - `fonts::load() -> Vec<Cow<'static, [u8]>>` for iced `.font()`; `FONT_SANS: Font = Font::with_name("Fluxer Sans")`, `FONT_MONO`. `icons::svg(name: IconName) -> iced::widget::svg::Handle` (static includes). - `palette::Theme` implementing iced's theme/catalog traits from `DARK`. --- Plan: https://git.forked.io/charles/fluxer-native/src/branch/foundation/docs/superpowers/plans/2026-11-11-foundation.md (section "Task 16")
charles added this to the Foundation milestone 2026-11-11 08:01:25 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/fluxer-native#16
No description provided.