Control css theme. Help!

Hi, I have a problem. That, I want to control height and weight in ThemePattern by a class or ....,

Like this I have put in element.style it work, but when i add css in my webbock. It does not get my css, keep using the Theme css

Solution

Hi Dat,


This is the precedence that Outsystems follows.

1-First precedence goes to inline style

2-Second Precedence goes to page level css

3-goes with theme level css

4-webblock has last precedence.


In-order to do the change in css i would recommend you to do changes in theme not at web-block.

There is one anther way to do that but i don't recommend this. 

in block itself write !important to overwrite all the rules.


.class{

height:10px !important;

width:10px !important;

}


Regards,

Pankaj

Solution

Hi Dat,

Have a look at Remco's solutions post in order to understand to correct css load order:

https://www.outsystems.com/forums/discussion/20463/how-to-control-css-load-order/

Regards,

Nordin

Pankaj pant wrote:

Hi Dat,


This is the precedence that Outsystems follows.

1-First precedence goes to inline style

2-Second Precedence goes to page level css

3-goes with theme level css

4-webblock has last precedence.


In-order to do the change in css i would recommend you to do changes in theme not at web-block.

There is one anther way to do that but i don't recommend this. 

in block itself write !important to overwrite all the rules.


.class{

height:10px !important;

width:10px !important;

}


Regards,

Pankaj


hi Pankaj, Thank you for helping me!