c-smile / sciter-sdk

Sciter is an embeddable HTML/CSS/scripting engine
http://sciter.com
Other
2.11k stars 224 forks source link

@const are broken #32

Closed pravic closed 8 years ago

pravic commented 8 years ago

samples/css++/conditional-constants.htm is not working even with fixing second #one.

c-smile commented 8 years ago

I do not have such file in SDK.

pravic commented 8 years ago

Yes, @const are works, verified right now.

As for conditional-constants, here it is, and not work:

<html>
  <head>
    <title></title>
    <style>
      @media test == 1 {
        @const TEST: #FF0000;
      }
      @media test == 2 {
        @const TEST: #0000FF;
      }
      div { color: @TEST; }
    </style>
    <script type="text/tiscript">
      $(button#one).onClick = function() { 
        view.mediaVars({test:1},true); 
      }
      $(button#two).onClick = function() { 
        view.mediaVars({test:2},true); 
      }      
    </script>
  </head>
<body>
  <div>Test</div>
  <button #one>1</button>
  <button #two>2</button>
</body>
</html>