thoughtbot / neat

A fluid and flexible grid Sass framework
https://neat.bourbon.io/
MIT License
4.42k stars 424 forks source link

Neat fails on import using DartSass 1.11.0 and 1.12.0 #654

Closed RazorfieldSquirrel closed 5 years ago

RazorfieldSquirrel commented 6 years ago

Neat 3.0 fails on import using DartSass 1.11 and 1.12

  1. Install dart sass (MacOS 10.13.6) via brew install sass/sass/sass
  2. install neat via ruby gem gem install neat
  3. Install neat to the working directory neat install
  4. Create SASS file -- ie main.scss
  5. Import Bourbon and Neat via @import "bourbon/bourbon"; @import "neat/neat";
  6. Compile via CLI sass main.scss main.css
  7. Error Error: expected "(".<br /> } @else if length($span) == 2 or if length($span) >= 3 { ^ neat/neat/functions/_neat-parse-columns.scss 19:38 root stylesheet neat/_neat.scss 16:9 @import main.scss 4:9 root stylesheet

I assume this is because Neat has a dependency on RubySass that isn't present in DartSass but since Ruby is being deprecated and both bourbon and bitters work fine it seems like an oversight unless I'm making a mistake (always possible!)

imdan commented 6 years ago

Yeah I'm having this same issue after updating to macos 10.13.6.

iamrenejr commented 6 years ago

I'm running into the same issue, but I resolved it by replacing that line with this:

} @else if length($span) == 2 or if(length($span) >= 3) {

It's not a Ruby dependency, but a syntax issue. I'm not sure if the issue is with Neat (needs to update that particular file) or with the npm implementation of Sass (needs to accept the Neat syntax), but this workaround seems to do the trick.

Here's my installed programs:

sass -v
Ruby Sass 3.5.7

neat -v
Neat 3.0.0

node -v
v8.10.0

Running on a Ubuntu 18.04.1 LTS (bionic)

iamrenejr commented 6 years ago

I've closed my PR after a week of not getting accepted. Hopefully another person will be able to fix the issue. :)

whmii commented 5 years ago

@bizMD I believe this issue has been resolved in master. Pending a few other PRs a release should be issued this week. Closing for now but if the issue persists feel free to re-open.