Twig {% set %} variables no longer render in Element CSS

Variables defined with {% set %} in Element CSS are no longer output when the CSS is compiled. The same Twig in a Raw Content element still renders correctly, so Twig itself is working. This used to work in an earlier version, so I believe it’s a regression.

Not sure exactly what version changed this behaviour, but I have been able to confirm it working previously in 6.5.8

Steps to reproduce

  1. Add a Div element to a page in Cornerstone.
  2. In the Element CSS add:
{% set colour = "blue" %}

$el {
  background-color: {{ colour }};
}

In 6.5.8 this outputs background-color: blue;
image

However in 6.9.6 this no longer works, as it tries to set background-color to a CSS var, but the var is not set.