Closed ghost closed 9 years ago
What version/flavour of Sass are you using? Works fine for me using plain ol’ Sass 3.3.11
.
Sass is v3.3.11 (Maptastic Maple), compass 0.12.7 and grunt-contrib-compass 0.9.0
Hi, i have the same error generating the css. Using Sass 3.3.11.
Me three -- using grunt-sass/node-sass/libsass.
According to sass/libsass/issues/278, they've merged in a fix to ignore the !global modifier but not implement the correct scoping behavior.
I'm still getting the error, but I'm assuming it's because of my version of libsass.
Compatibility with libsass/Sass 3.2 asside, the use of !global
here feels a bit wrong and is a bit confusing to understand.
I realize that this was implemented to DRY up the $breakpoint
iteration, but is there a way to do this that does not require setting and unsetting a global var?
As a minimal change to get this working, I've submitted #4, which preserves the basic functionality, but does not use the breaking !global
Alternatively, people can depend on 0.0.2
in their bower.json
(which compiles out to basically the same css and does not have the breaking !global
keyword)
!global
will break Sass 3.2 and Libsass compiles, no matter how much logic you write to avoid the situation.
However there is a workaround to your use case! You can use a function for your logic and then write the variable from global scope instead of nested within the logic itself. Here is a gist of it: http://sassmeister.com/gist/a9619ea180d8b7ea9d4e
…Also @desgnl, Compass 0.12.x is not compatible with Sass 3.3.x. You are probably actually on Sass 3.2.x.
@scottkellum looking at your example but not 100% clear on implementation in that specific case. Would you mind sharing how you'd modify the inuit-generate-spacing
mixin? Thanks.
@minimaldesign I think this bug is fixed in LibSass and can probably be closed.
Indeed! Just updated to latest libsass and it's now working… Thanks!
I have an error when generating the css of this file: