I want to apply specific CSS classes based on parent class for the responsive behavior of my web block.
I get an error when I try to write nested CSS classes.
How can I do it in Outsystems?
See the below image for nested class samples.
I do not think Outsystems supports nested CSS selectors like &. also, the whole OutsystemsUI CSS is written without any kind of selector.
you may load external CSS file with your own syntax but it is not recommended, kindly check this post : https://www.outsystems.com/forums/discussion/49067/using-local-css-file/
I have marked it as a solution as it states clearly that nested CSS classes are not allowed in Outsystems as of now.It doesn't solve my problem but it should be enough for other developers to understand the current limitation of Outsystems
apply specific CSS classes based on a parent class for responsive behavior, you can do the following:
Currently, I do like this only but it's not very clean or structured.Anyways looks like Outsystems does not support nested CSS classes as of now. Its a pity but I hope they allow it in the future.
Hi Rahul Tiwari,
Nesting style CSS is supported in OutSystems. It's showing just a warning/error symbol in the stylesheet, but I am able to publish, and it was working fine. You can check the images below.
Service Studio Theme might not support this feature since it's just a recent publication for CSS. Though since December 2023, this feature has worked across the latest devices and major browser versions.
I suggest using it with caution if you're planning to support older browsers or devices. Find more information here
Regards,
Kharlo