Libsass: regression: input[type=url] { ... } fails to parse

Created on 29 Jun 2017  路  2Comments  路  Source: sass/libsass

input.scss

input[type=url] {
  content: bar
}

Actual results

libsass 3.4.5 and libsass 3.5.0.beta.3-64-g5cb5

Error: Invalid CSS after "i": expected 1 selector or at-rule, was "input[type=url] {"
        on line 1 of test.scss
>> input[type=url] {
   ^

Expected result

libsass 3.4.4

input[type=url] {
  color: red; }

May also be related to: https://github.com/sass/libsass/issues/2427

From bisect it appears to be this commit:

10398ed299bffa7ccc32aace50dacbe1a51379a2

10398ed299bffa7ccc32aace50dacbe1a51379a2 is the first bad commit
commit 10398ed299bffa7ccc32aace50dacbe1a51379a2
Author: Marcel Greter <[email protected]>
Date:   Sat May 20 19:01:04 2017 +0200

    Fix parser for urls looking like ruleset selectors (#2376)
Bug - Confirmed Dev - PR Ready Dev - Test Written

Most helpful comment

A workaround (I think?) is to use input[type="url"] { ... } instead.

All 2 comments

Thanks @asottile, I'll take a look this weekend.

A workaround (I think?) is to use input[type="url"] { ... } instead.

Was this page helpful?
0 / 5 - 0 ratings