Use of CSS constants in script.

In Sciter you can define CSS constants using @const declarations like this:

  @const TEST_STR:"test";
  @const TEST_COLOR: rgb(128,0,0);
  @const TEST_NUMBER: 128;

and use them not only in CSS ( as @TEST_COLOR for example ) but also in script using accessor like this:

var test_str ="TEST_STR");

If you think that is too narrative then you can define short “stringizer” function for it:

  function $const( name ) { return || ""; }

and later use it as:

var t1 = $const(TEST_STR); // "test" string
var t2 = $const(TEST_COLOR); // object of type Color, color(128,0,0)
var t3 = $const(TEST_NUMBER); // integer, 128