Theme - create one main theme with childs

Hi, I want to ask about creating a themes.

We have 1 custom theme, let’s say it’s called “prod”. Now we want to create a new theme called “test”. I want that when I add something to the prod theme, it will also show up on our server with the test theme in use. In the test theme I will change only 1 thing, for example .jmix-drawer .jmix-drawer-header and I will have different colors for the production and test server.

Now I have a prod and a test theme with the same values inside and if I add something to one, I have to add it to the other and that’s not the best solution. When we create 2 more themes for other servers , it will be really crazy to maintain it.

Is there any way to create 1 main theme, which will be parent for more themes and I will only change few things for prod, test, dev servers?

I tried it through @import and @mixin, but when I tried to compile themes, I get errors:
[ThemeCompile] Import ‘…/themes/test/test’ in ‘C:\dev<app>\build\tmp\themes\VAADIN\themes\test\styles.scss’ could not be found
[ThemeCompile] Mixin Definition: test not found

Thank you
Pavel

Hi,

Theme extension is possible, but without investigating your code, it’s hard to give any suggestions. Could you please attach a small demo project that reproduces the issue?

Regards,
Gleb

Hi, its weird, but in new project, i can compile and run application.

I cant add demo here, cause its too big, but will be my theme files enough? But still, some things looks like they are using my test theme, but login button is using default halo and not prod theme.
themes.zip (9.7 KB)

Thanks

If the same configuration works in the demo project then you need to compare your project with the demo and find the differences.

Regarding your theme files. The only thing I can mention is that test theme don’t need to extend halo because prod already extends halo.

Gleb