nathansmith / unsemantic

Fluid grid for mobile, tablet, and desktop.
http://unsemantic.com
MIT License
1.38k stars 161 forks source link

Warning using unquote() #77

Closed nicooprat closed 9 years ago

nicooprat commented 9 years ago

Hi, I'm using Codekit with Sass 3.4.10 + Libsass 3.1 and I'm having a lot of this kind of warning :

DEPRECATION WARNING: Passing null, a non-string value, to unquote()
will be an error in future versions of Sass.

Do you have a workaround ? I tried to modify some code of Unsemantic but without success. I'd rather not to disable warnings. Thanks !

pixelize commented 9 years ago

Same problem on one of my project. unquote args have to be quoted unquote('something');

Btw, as this project is no more really maintained (btw the author's not seeming taking time to answer to issues ? ), I suggest you using more evolutive & recent grid systems like bootstrap or jeet for your next project.

shawn458 commented 9 years ago

A solution to this is to create a safe version of unquote. It only gets called if it's a string.

Add this function: @function safe-unquote($param) { @return if(type-of($param) == string, unquote($param), $param); }

Then, change all unquote() functions to safe-unquote() inside of _unsemantic-vars.scss.

ctumolosus commented 9 years ago

I was having issues parsing unsemantic through libsass as well and @shawn458 solution worked for me.

nicooprat commented 9 years ago

I can confirm it works, thanks @shawn458. The function can be simply copy/pasted in the beginning of _unsemantic-vars.scss.