Conditional CSS of the Web Screen Style Sheet

Conditional CSS of the Web Screen Style Sheet

  

Hi Dears,

I'm using a knowledge from forum to colapse the menu in Dublin Theme SilkUIFramework. This solution is write some comands in the Style Sheet property of the WebScreen. It works fine. Then now I want to turn this optional only for some users. How can I do it ?

Thanks,

Roberto

Hi Roberto,

Did you think about adding those CSS classes to collapse only for those users?

Maybe it should help if you share your oml.


Regards,

António Pereira 

Hi Antônio,

Thanks for your response. Yes, I would like to collapse only for specif users. I attached an oml with a little example. In the screen "ScreenWithOutMenu" I have the commands below put in the StyleSheet property of the WebScreen (recommendation of forum post).

SyntaxEditor Code Snippet

.Menu {
    display:none;
    width:  0px;
}

.Content.ThemeGrid_Wrapper {
    left: 0px;
}

My doubt is how can I include a conditional option in these commands.

Thank you,

Roberto

Solution

Hi Roberto. You can't use conditionals on CSS. But you can use an IF widget to include a given CSS block.

Inside the IF widget, place an expression with the following contents:

<style type="text/css">
.Menu {
    display:none;
    width:  0px;
}

.Content.ThemeGrid_Wrapper {
    left: 0px;
}
</style>

Just don't forget to use Escape Content = No.

Solution

Hi Leonardo,

How are you?

Thanks for your help. It works fine.

Best Regards,

Roberto

Just like to add that for Mobile Apps, you can use conditional expressions in CSS.


Kilian Hekhuis wrote:

Just like to add that for Mobile Apps, you can use conditional expressions in CSS.

Great, Kilian! Thank you very much,