Libsass: Parsing regression in 3.4.5

Created on 24 Jun 2017  ·  2Comments  ·  Source: sass/libsass

Parsing regression

This appears to be working in 3.5 betas, and versions prior to 3.4.5.

input.scss

This is taken from materialize-css project (_navbar.scss)

  form {
    height: 100%;
  }

  .input-field {
    margin: 0;
    height: 100%;

    input {
      height: 100%;
      font-size: 1.2rem;
      border: none;
      padding-left: 2rem;

      &:focus, &[type=text]:valid, &[type=password]:valid,
      &[type=email]:valid, &[type=url]:valid, &[type=date]:valid {
        border: none;
        box-shadow: none;
      }
    }

    label {
      top: 0;
      left: 0;

      i {
        color: rgba(255,255,255,.7);
        transition: color .3s;
      }
      &.active i { color: blue; }
    }
  }

Actual results

libsass 3.4.5

Error: Invalid CSS after "...ing-left: 2rem;": expected "}", was "&:focus, &[type=tex"
        on line 13 of test.scss
>>       padding-left: 2rem;

Expected result

node-sass 3.4.4
./node_modules/.bin/node-sass --output-style compressed ./test.scss > ./test1.css

form{height:100%}.input-field{margin:0;height:100%}.input-field input{height:100%;font-size:1.2rem;border:none;padding-left:2rem}.input-field input:focus,.input-field input[type=text]:valid,.input-field input[type=password]:valid,.input-field input[type=email]:valid,.input-field input[type=url]:valid,.input-field input[type=date]:valid{border:none;box-shadow:none}.input-field label{top:0;left:0}.input-field label i{color:rgba(255,255,255,0.7);transition:color .3s}.input-field label.active i{color:blue}

libsass 3.4.4
sassc -t compressed test.scss ./test.css

form{height:100%}.input-field{margin:0;height:100%}.input-field input{height:100%;font-size:1.2rem;border:none;padding-left:2rem}.input-field input:focus,.input-field input[type=text]:valid,.input-field input[type=password]:valid,.input-field input[type=email]:valid,.input-field input[type=url]:valid,.input-field input[type=date]:valid{border:none;box-shadow:none}.input-field label{top:0;left:0}.input-field label i{color:rgba(255,255,255,0.7);transition:color .3s}.input-field label.active i{color:blue}

Failing Version

version info:

❯: sassc -v
sassc: 3.4.5
libsass: 3.4.5
sass2scss: 1.1.0
sass: 3.4

Working Versions

❯: ./node_modules/.bin/node-sass -v
node-sass   4.5.3   (Wrapper)   [JavaScript]
libsass     3.5.0.beta.2    (Sass Compiler) [C/C++]
❯: sassc -v
sassc: 3.4.5
libsass: 3.4.4
sass2scss: 1.1.0
sass: 3.4

Unable to provide srcmap link, compiler fails just as it does with libsass 3.4.5

Bug - Confirmed Invalid - Duplicate

Most helpful comment

Confirmed as duplicate of #2429 - thanks for the report @camflan and for the triage @asottile !

All 2 comments

I've either simplified the reproduction or found a separate bug that's suspiciously similar: https://github.com/sass/libsass/issues/2429

Confirmed as duplicate of #2429 - thanks for the report @camflan and for the triage @asottile !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

delijah picture delijah  ·  7Comments

xzyfer picture xzyfer  ·  11Comments

c0d3xpl0it picture c0d3xpl0it  ·  4Comments

GottZ picture GottZ  ·  3Comments

xzyfer picture xzyfer  ·  9Comments