Problem is, this does not work because whenever CSS is inserted into the page, it has automatically the “scoped-******” in a div in the middle and therefore we cannot properly target the CSS:
Therefore, it will never work this way. Is there another way to make this work?
Thanks!
PS: I just started working with fixed grid layouts and am using animated SVGs, this is AMAZING to create tablet screens that look fancy and with some cool animated things in there. I might just create a video showing it when I finish (it will take time though, I’m doing this during my very little free time).
The widget expressions have a themeOptions object, which among other things has a dark key with values of either 'light' or 'dark'. You can use this to set a css variable somewhere above the level of your image and then use the variable in the image’s style.
If you tried it in a stylesheet property then it will not work directly. The stylesheet text is used as is and not parsed by the expression parser. This is why I gave an example that sets a css variable in a style object which does get parsed. Then you can use the variable name in the stylesheet.
If you put the expression in a style object and it still didn’t work, then you are going to have to post what you did here so I can see what went wrong.