Skip to content

Certain conditionals not working properly in gss file #215

@gabeblackbeard

Description

@gabeblackbeard

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions