Hi Team Radzen,
In the app I'm working on at the moment, we have 3 sub apps, each of which have been requested to have their own "Brand Palette".
I've already got theme selection working in each of the layout files by adding code like this to each Layout.razor file where needed:
@code
{
[Inject]
private ThemeService _themeService { get; set; } = default!;
protected override void OnInitialized()
{
_themeService.SetTheme("default");
base.OnInitialized();
}
}
This approach works great, and I can set "material", "software" any of the free themes, and IF I build my own theme file and save it in the css folder in my wwwroot, as "/css/-base.css" I can load that theme simply by swapping "default" for "" EG:
_themeService.SetTheme("mytheme");
Will look for "/css/mytheme-base.css" and load it, if it exists.
HOWEVER, what I'm finding is that SetTheme seems to replace EVERY css rule when used.
For example, if I do a full theme with EVERY option in, and load it in the root of my site, then say I do only a partial css and change just a handful of the colour vars, then load that. Instead of just changing the colours, it seems to wipe out everything.
The colours do change as expected, but everything else, tables, borders, inputs all get set back to browser defaults.
Is there away just to apply the base theme in the root pages, and customise only the colours in the parts that matter, or do I absolutely have to provide a full theme css file each time?