Hi  Team,

Just started a new project in OS 11 and dealing with Root - CSS Variables. (for Typography and branding)

It seems we can't change the root variable or CSS directly in base theme CSS.

so my question is overwriting the CSS in the newly created module's theme will be a good option or it will affect the performance.


Regards,

Pankaj

Solution

Hi Pankaj,

I'm also working in a project in version 11 and what we did is create a new theme that is base on Basetheme. All our applications use this new theme. In this new theme we overwrite the variables. Of what I was this is the only option. The performance impact is that 1 more CSS file is being loaded. But unless you are using BaseTheme without any changes you will always have this extra file.

Regards,

Marcelo

Solution

Hi Pankaj,


You can find here the different options and its advantages / disadvantages.

As Marcelo said setting a theme that uses a base theme will have the downside of downloading an extra CSS file in all screens using that theme, but it also gives you the advantage of being able to have new updates of the base theme.

As an advice, I would suggest to not have style sheets on web blocks nor themes on the Core Widgets to avoid the download of even more CSS files, but instead merge them on your theme.


Cheers,

João

Marcelo Ferreira wrote:

Hi Pankaj,

I'm also working in a project in version 11 and what we did is create a new theme that is base on Basetheme. All our applications use this new theme. In this new theme we overwrite the variables. Of what I was this is the only option. The performance impact is that 1 more CSS file is being loaded. But unless you are using BaseTheme without any changes you will always have this extra file.

Regards,

Marcelo

Thanks, Marcelo for your explanation.


João Marques wrote:

Hi Pankaj,


You can find here the different options and its advantages / disadvantages.

As Marcelo said setting a theme that uses a base theme will have the downside of downloading an extra CSS file in all screens using that theme, but it also gives you the advantage of being able to have new updates of the base theme.

As an advice, I would suggest to not have style sheets on web blocks nor themes on the Core Widgets to avoid the download of even more CSS files, but instead merge them on your theme.


Cheers,

João

Thanks, Joao for your detailed information.

but I have seen Outsystems UI element itself has CSS and js in block level that causes the performance.


Regards,

Pankaj