Kronuz/pyScss — pull request #284 by tkhyn (2014-06-23 23:00:56+00:00)
Title: Fixes sprite magic import

Hi there,

While discovering and playing with pyScss to see if I could implement / plug in a little project of mine \*, I noticed that the ``@import`` rule used with png files was completely broken, with remnants from old code (such as ``rule.context``) that showed that the _at_magic_import had been forgotten for a little while.

I attempted to fix all that to get the correct compass behavior, and added the missing sprite_does_not_have_parent and sprite_has_selector functions referenced in the compass library for 'magic sprites' (http://compass-style.org/help/tutorials/spriting/magic-selectors/).

Before that, I also fixed some issues with the windows file separators, using os.sep wherever possible / applicable (i.e. not when the input was an URL). Some of them were only for test success, others were bugs.

Note: Before merging, please check that these commits do not break the fonts.scss test, this is the only one I did not run (would have had to build fontforge with python bindings on windows and that bore me).

\* the idea is to integrate an automatic SVG spriting mechanism that would work the same way as PNG spriting except it would optimize the SVGs first as well as generate PNG fallback sprites for incompatible browsers. I already have some python code to do that independently but now I want to be able to do ``@import "icons/*.svg";`` in my SCSS.