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

Fix SASS %placeholder classes #162

Closed
ldexterldesign opened this issue Dec 3, 2014 · 5 comments
Closed

Fix SASS %placeholder classes #162

ldexterldesign opened this issue Dec 3, 2014 · 5 comments

Comments

@ldexterldesign
Copy link

Hey,

I'm having trouble compiling the following code in my project (i.e. .baz just won't compile at all)?:

screen shot 2014-12-03 at 21 13 07
http://sassmeister.com/gist/cc6a698fe2b004cef25c

I'm using the following dependencies as part of https://github.com/zurb/foundation-libsass-template :

package.json:

{
  "name": "foundation-libsass-template",
  "version": "0.0.1",
  "devDependencies": {
    "node-sass": "1.1.4",
    "grunt": "0.4.5",
    "grunt-contrib-watch": "0.6.1",
    "grunt-sass": "0.16.1"
  }
}

Gruntfile.js:

module.exports = function(grunt) {
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),

    sass: {
      options: {
        includePaths: ['bower_components/foundation/scss']
      },
      dist: {
        options: {
          outputStyle: 'nested'
        },
        files: {
          'css/app.css': 'scss/app.scss'
        }        
      }
    },

    watch: {
      grunt: { files: ['Gruntfile.js'] },

      sass: {
        files: 'scss/**/*.scss',
        tasks: ['sass']
      }
    }
  });

  grunt.loadNpmTasks('grunt-sass');
  grunt.loadNpmTasks('grunt-contrib-watch');

  grunt.registerTask('build', ['sass']);
  grunt.registerTask('default', ['build','watch']);
}

Could anyone shed any light on why my Sass won't compile?

As far as I know %placeholders now work in LibSass ( sass/libsass#146 ), so why isn't the functionality finding its way into my project?

Yours hopefully,

@ldexterldesign
Copy link
Author

It's debatable whether you would actually want to use this technique ( http://www.sitepoint.com/sass-mixin-placeholder/ ), but in addition I get weird %placeholder/@extend output using the following Sass:

screen shot 2014-12-03 at 21 43 56
http://sassmeister.com/gist/0a6ba242541a64b1aa2d

Really miffed!

Yours hopefully,

@xzyfer
Copy link
Contributor

xzyfer commented Dec 3, 2014

Hi @ldexterldesign , I work on Libsass.

grunt-sass is using an older version of node-sass (1.0.3) which is using Libsass 3.0.0. This is likely responsible for the discrepancy you're seeing.

It's also worth noting that although sassmiester says it's using Libsass 3.0.1 it's actually using 3.0.2 - https://twitter.com/sassmeisterapp/status/537472368591917056

@ldexterldesign
Copy link
Author

@xzyfer aww, thanks for pointing this out – big help

@sindresorhus is there a reason we're not rolling on v1.1.4 ~ https://github.com/sass/node-sass/releases

Yours hopefully,

@ldexterldesign
Copy link
Author

@ldexterldesign
Copy link
Author

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

No branches or pull requests

2 participants