gss / engine

GSS engine
http://gss.github.io
MIT License
2.87k stars 104 forks source link

Certain conditionals not working properly in gss file #215

Open gabeblackbeard opened 8 years ago

gabeblackbeard commented 8 years ago

Yet another oddity I've come across regarding inline gss vs external gss. This following code

@if ::window[width] >= 600 {
  #test-div{
    background-color:blue;  
  }   
}@else{
  #test-div{
    background-color:green;      
  }
}

#test-div{
  size:==100; 
}

does not work at all when inside a gss file that is linked by the main html page. Not even the @else triggers. However, if applied inline, in the head section of the page, it works.

I can verify that this problem only arises with properties such as ::window[width] and $scroll-top. When using other properties such as div[width] for the condition, I'm having no issues.

Anyone know the reason behind this? It feels as if the external gss file can't access properties such as ::window[width] and $scroll-top but that can't be the case since I'm able to use them in other sections of my code.