-
Notifications
You must be signed in to change notification settings - Fork 141
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
Fixes sprite magic import #284
base: master
Are you sure you want to change the base?
Conversation
--HG-- branch : import_sprite extra : amend_source : 827ba5ccd5408ded9faaf329c6d4c52304f96a98
--HG-- branch : import_sprite
Check the |
Ok. Will have a look at how fonts are generated to pick some ideas, thanks. |
…wn functions --HG-- branch : import_sprite
--HG-- branch : import_sprite
and properly fixed the issue that was introduced by commit 6c00584a0dab --HG-- branch : import_sprite
Feel free to let me know if there is anything that needs to be done on my side - or that you don't like, or that is not in the project's philosophy, or whatever - about this sprite import fix. Merging it with the current master branch is straightforward. Btw, on the basis of this fix I have SVG spriting working in beta on my svg_sprite branch, using pyconizr which I'm developing in parallel. You may want to check it out, not much customization options yet (actually none, that'll come), but it does the job. |
So that one doesn't have to clear the assets dirs between test runs
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 asrule.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
andsprite_has_selector
functions referenced in the compass library for 'magic sprites' (http://compass-style.org/help/tutorials/spriting/magic-selectors/, this uses https://github.com/Compass/compass/blob/stable/frameworks/compass/stylesheets/compass/utilities/sprites/_base.scss).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 bored 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.