OpenWGA 7.10 - OpenWGA Concepts and Features

Design and development » JavaScript and CSS » SCSS Preprocessor

Predefine scss variables

SCSS support variables.

If you need to calculate predefined variables using TMLScript define a tmlscript scripts/tmlscript/wga/css-variables.tmlscript that returns a JavaScript object.

Sample:

return {

bg_color: "#ffc800",

text_color: "#004080"

}

The returned object properties are available as $<propertyname> ($bg_color and $text_color in this sample) inside your scss:

body{

background-color: $bg_color;
color: $text_color;

}