Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing Compass + Singularitygs's background-grid mixin causes SassMeister being unable to compile the stylesheet #168

Closed
lozandier opened this issue Mar 11, 2014 · 15 comments

Comments

@lozandier
Copy link

Attempting to import Compass (@import "compass") and then trying to use singularitygs's background-grid causes SassMeister to fail in its attempt to compile the stylesheet.

wrong number of arguments (25 for 1..2) for `_linear-gradient_legacy'

Version of Compass being used by Singularity: 1.0.0.alpha.18
Version of Sass: 3.3.0
Version of Singularitygs: 1.2.0.rc.6

http://sassmeister.com/gist/9478983

@lozandier
Copy link
Author

@lolmaus It's not related to any sassmeister gist, including a blank one, but I'll create one in a few moments showing this behavior.

Steps to Reproduce The Problem

  1. @import compass
  2. @import singularity
  3. +sgs-change("debug", true) or `@include sgs-change("debug", true)
  4. Use +background-grid or @include background-grid
  5. Error occurs.

Example

An example from a gist I happen to have open.

Before

screen shot 2014-03-11 at 4 36 57 am

After

screen shot 2014-03-11 at 4 38 57 am

@lozandier
Copy link
Author

@lolmaus Gist provided; can be found here

@Snugug
Copy link
Member

Snugug commented Mar 11, 2014

No need to keep going, I know what the issue is. Working to fix

@Snugug Snugug closed this as completed in f4e7a1b Mar 11, 2014
@lozandier
Copy link
Author

The issue still happens. I just tried to use Singularity 1.2 & Compass 1.0.0.alpha18 and still got the same error.

@primozs
Copy link

primozs commented Apr 5, 2014

Same issue here Singularity 1.2 & Compass 1.0.0.alpha19
It seams like linear-gradient function problem

@kogakure
Copy link

kogakure commented Apr 5, 2014

I ran into the same issue. Without Compass it’s working (Demo: http://sassmeister.com/gist/9992763). When using Compass the error occurs. Using Compass 1.0.0.alpha19.

@Snugug
Copy link
Member

Snugug commented Apr 28, 2014

It looks like the linear-gradient function in Compass overrides the standard linear-gradient that we use, and only works when used inside of a Compass mixin. Therefore, I think we're going to need to interpolate what we're outputting in some way.

@Snugug
Copy link
Member

Snugug commented Apr 28, 2014

Relevant Code

Suggested Fix:

background-image: unquote('linear-gradient(to #{opposite-direction($Direction)}, #{$Gradient})');

@primozs
Copy link

primozs commented Apr 28, 2014

in my case then there is another problem in background-build mixin:

Syntax error: Incompatible units: 'em' and '%'.
        on line 201 of /Users/primozsusa/.rvm/gems/ruby-1.9.3-p286/gems/singularitygs-1.2.0/stylesheets/singularitygs/helpers/_background-grid.scss, in `background-build'
        from line 52 of /Users/primozsusa/.rvm/gems/ruby-1.9.3-p286/gems/singularitygs-1.2.0/stylesheets/singularitygs/helpers/_background-grid.scss, in `background-grid'

@grayghostvisuals
Copy link

@Snugug

sass file

@include sgs-change('debug', true);

.grid {
    @include background-grid;
}

Suggested Fix above: singularitygs/helpers/_background-grid.scss

@if $bkpt != -1px {
      @include breakpoint($bkpt) {
        // background-image: linear-gradient(to opposite-direction($Direction), $Gradient);
        background-image: unquote('linear-gradient(to #{opposite-direction($Direction)}, #{$Gradient})');
      }
    }
    @else {
      // background-image: linear-gradient(to opposite-direction($Direction), $Gradient);
      background-image: unquote('linear-gradient(to #{opposite-direction($Direction)}, #{$Gradient})');
    }

Result

Running "compass:dist" (compass) task
    error css/src/styles.scss (Line 172 of _background-grid.scss: Function column-count finished without @return)
overwrite css/styles.css
Compilation took 1.412s

@Snugug
Copy link
Member

Snugug commented Apr 28, 2014

The fix isn't implemented yet, however, initial testing suggests you should not be getting those results. Those were really notes for me.

@niairo
Copy link

niairo commented Apr 28, 2014

Just to say, that the Suggested Fix worked well for me :
Using compass-core 1.0.0.alpha.19
Using singularitygs 1.2.0

@jottr
Copy link

jottr commented May 3, 2014

@Snugug do you have any suggestions what we do until a fix can be released?
I am beginning a new project and would like to use singularity grids in conjunction with compass.
Since 1.2.0 introduced a new syntax, I don't see the point in downgrading to a previous release.

@Snugug Snugug closed this as completed in ff17553 May 3, 2014
@Snugug
Copy link
Member

Snugug commented May 3, 2014

Just released v1.2.1 that includes my recommended fix

@jottr
Copy link

jottr commented May 3, 2014

Perfect! Thank you for fixing this @Snugug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants