https://github.com/soenneker/soenneker.quark.gen.themes
A source generator for generating Quark css files at compile time
https://github.com/soenneker/soenneker.quark.gen.themes
csharp css dotnet gen generator quark quarkthemegenerator source themes theming util
Last synced: about 1 month ago
JSON representation
A source generator for generating Quark css files at compile time
- Host: GitHub
- URL: https://github.com/soenneker/soenneker.quark.gen.themes
- Owner: soenneker
- License: mit
- Created: 2026-01-28T00:45:04.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2026-03-04T21:05:49.000Z (3 months ago)
- Last Synced: 2026-03-04T21:55:44.638Z (3 months ago)
- Topics: csharp, css, dotnet, gen, generator, quark, quarkthemegenerator, source, themes, theming, util
- Language: C#
- Homepage: https://soenneker.com
- Size: 924 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
[](https://www.nuget.org/packages/soenneker.quark.gen.themes/)
[](https://github.com/soenneker/soenneker.quark.gen.themes/actions/workflows/publish-package.yml)
[](https://www.nuget.org/packages/soenneker.quark.gen.themes/)
[](https://github.com/soenneker/soenneker.quark.gen.themes/actions/workflows/codeql.yml)
#  Soenneker.Quark.Gen.Themes
### A source generator for generating Quark css files at compile time
## Installation
```
dotnet add package Soenneker.Quark.Gen.Themes
```
## Usage
Add the attribute to a class that exposes a single public static method or property returning a `Theme`.
```csharp
using Soenneker.Quark;
using Soenneker.Quark.Gen.Themes;
[GenerateQuarkThemeCss("wwwroot/css/quark-theme.css")]
public static class MyTheme
{
public static Theme Build() => new()
{
Name = "MyTheme",
Tokens = new ThemeTokens
{
Light =
{
Primary = "oklch(0.623 0.214 259.815)",
PrimaryForeground = "oklch(0.985 0 0)"
}
},
Buttons = new ButtonOptions
{
// theme options here
}
};
}
```
By default the same theme definition also emits `tailwind/quark-theme.generated.css`, which `Soenneker.Quark.Gen.Tailwind` can import to override the baked-in shadcn theme defaults at build time.