Unable to add css style to custom theme

Hi,

I am trying to add a custom theme from “halo” to my project.
I followed the guide on Creating a Custom Theme :: Jmix Documentation

Therefore:

  1. I right-click on the User Interface node in the Jmix project window and select New → Custom Theme named 2pippo"

  2. Then I checked that pippo-theme.properties was created and contained
    @include=io/jmix/ui/theme/halo-theme.properties

  3. styles.scss contained:

@import "pippo-defaults";
@import "addons";
@import "pippo";

.pippo {
  @include addons;
  @include pippo;
}
  1. application.properties contains
jmix.ui.theme.name=pippo
jmix.ui.theme-config=com/company/pluto/theme/pippo-theme.properties
  1. I then compiled theme using:
    Jmix Studio, open the Gradle tool window and double-click TaskswebcompileThemes

  2. I then opened the pippo.scss file and modified the file to change the aspect of the login page

@import "../halo/halo";

@mixin pippo {
  @include halo;

.jmix-login-panel {
background: #ed473b;
border:5px solid #c5c5c5;
border-radius:4px;
padding:50px
}


}
  1. I compiled the theme again and tried to brows the new changes
    localhost:8080

Unfortunately it is not working and i am not able to figure out what am I doing wrong.

David

Hi,

After theme is created, the app must be re-started, otherwise application.properties changes won’t be applied. I don’t see any problems with your styles and they work for me.

Also, may be helpful refreshing the page without cache.

Regards,
Gleb

Hi Gleb,
thank you very much for your quick answer.

I confirm you that I restarted the app after compiling the theme and browsed in anonymus window.

If I set the css commands directly in the .xml screen file of the page, it takes effect, using scss is not talking effect

Could you please attach a small demo project that reproduces the problem? I’ve added your styles to mine and they work as expected.

Gleb

Dear Gleb,
i think was an issue realted to my laptop

I did a new installation, set the Chrome browser to not cache files,
compiled theme and restarted and everithyng works fine.

thank you very much for the suggestions!
David