Enable / disable CSS attributes on HTML elements conditionally
You can use the built-in if()
expression to control CSS attributes in HTML elements:
If the condition does not apply, the special value null
can be used to prevent the rendering of an empty class=""
attribute in the HTML output.