CSS variables are not interpreted in Popups

CSS variables are not interpreted in Popups

  

Hello community.


I have some variables in my CSS code:

 

When i use them in the style sheet of the Popups i have, this CSS isn't interpreted. This is a piece of the style sheet from a Popup:


The CSS variables work like a charm in normal web screens but in Popups they don't style like i want to.

Any thoughts?


Best regards,

Rafael Valente

Hi Rafael,

could this have something to do with Popups being rendered in an IFrame?

Jorge Martins wrote:

Hi Rafael,

could this have something to do with Popups being rendered in an IFrame?

Hello Jorge,


Shouldn't IFrame's inherit the CSS from the parent screen when they are in the same domain?


Rafael Valente wrote:

Hello Jorge,


Shouldn't IFrame's inherit the CSS from the parent screen when they are in the same domain?


Hello Rafael.

The answer is "no". If they are in the same Domain, you CAN manipulate the content of the iFrame with JavaScript, but the iFrame will not inherit Style/Scripts.

So, if you want the PopUp to use the CSS, you will have to define it in the Applications CSS page.

Cheers,
Eduardo Jauch


Eduardo Jauch wrote:

Rafael Valente wrote:

Hello Jorge,


Shouldn't IFrame's inherit the CSS from the parent screen when they are in the same domain?


Hello Rafael.

The answer is "no". If they are in the same Domain, you CAN manipulate the content of the iFrame with JavaScript, but the iFrame will not inherit Style/Scripts.

So, if you want the PopUp to use the CSS, you will have to define it in the Applications CSS page.

Cheers,
Eduardo Jauch


Hello Eduardo,


Excuse my ignorance, but how can i define the CSS in the Aplication CSS page?


Hello Rafael, 

Sorry, I mean the Theme Style Sheet page.

The CSS defined here will be applied on all pages.

Eduardo Jauch wrote:

Hello Rafael, 

Sorry, I mean the Theme Style Sheet page.

The CSS defined here will be applied on all pages.

I see Eduardo. Thank you for your help. I'll give a try and comeback later with feedback.


Best regards,

Rafael Valente