What is the Best practice to Custom themes (On template level, or Application Label)?

What is the Best practice to Custom themes (On template level, or Application Label)?

  

When I create a custom reusable block, what is the best practices, (i.e. should I use the CSS on block level or not? If not what is the best practices, because I need the block in separate module other than app?

Suppose the scenario below- What is the best place to add custom themes ? Once we change it should reflect to the app.



Thanks

Dileep.




 

 

 

Solution

Dileep Verma wrote:

When I create a custom reusable block, what is the best practices, (i.e. should I use the CSS on block level or not? If not what is the best practices, because I need the block in separate module other than app?

Suppose the scenario below- What is the best place to add custom themes ? Once we change it should reflect to the app.



Thanks

Dileep.




 

 

 

Hi Dileep,

My practice of creating the theme is.

=> I always create a separate theme application where I put all my CSS in theme style (not in web block) and all reusable web block, So that this application is available for my all application if I want to use the same theme in other micro application.


About your second question if you change the theme CSS in the theme module you need not take the dependency to the consumer module form theme module.

But if you change the CSS element in the consumer module you need to take the dependency of theme module to consumer module.


For example-If you are adding a class to a container and this class already exists in your theme module you need not take dependency of theme module.


But If you are adding a class to a container and this class does not exist in your theme module you need to take dependency of theme module.



Hope it help.


cheers.



Solution

Thanks Pankaj.