Skip to content

feat/tweakcn-theme-import — bake tweakcn themes into projects at build time #21

Description

@Shewart

Build-time (not runtime) integration with tweakcn.com theme URLs.

Ships a shellui theme apply <tweakcn-url> CLI subcommand that fetches the theme JSON and rewrites the user's input.css (:root and .dark blocks). Tailwind then compiles the theme into their app.css during dotnet build. No runtime dependency on tweakcn, works offline, exactly-what-you-see is exactly-what-ships.

Scope

  • shellui theme apply <url> — fetch tweakcn theme, rewrite input.css :root/.dark blocks
  • shellui theme apply <url> --emit-override <path> — for Path A/D users, write an override CSS file (they link it after shellui-all.css)
  • shellui theme init <url> — combined init + apply (chain during setup)
  • shellui theme update — refresh from last-used URL
  • shellui.theme.lock — records source URL + hash for reproducible re-applies
  • Extend the four install-path READMEs in shellui-installation-tests/ with theme-apply examples
  • New test project path-c-cli-tweakcn/ — end-to-end demo

Why not runtime fetch?

Considered a ShellUI.applyTweakcnTheme(url) JS helper that fetches at page load. Trade-offs made runtime a bad default:

  • Flash of wrong theme (FOUT)
  • Runtime dep on tweakcn.com availability
  • Doesn't work offline / airgapped / CI
  • Extra HTTP round-trip on every page load

Build-time bake gives the user exactly what they want ("CSS shipped, exactly what user wants") without those costs. Runtime helper can ship as an opt-in later if there's demand.

Depends on

feat/nuget-precompiled-bundle — merges the precompiled CSS pipeline this feature layers onto.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions