Skip to main content
OutSystems

How to have conditions in style sheets

Question

Is it possible to have an expression in a style sheet?

I want to include some CSS classes based on the role of a user.

Answer

You can use the extended properties of widgets to load specific classes based on conditions.

The example below applies one of two classes depending on the result of CheckRegisteredRole().

unnamed.png

  • Was this article helpful?