GithubHelp home page GithubHelp logo

Comments (8)

jorgebastida avatar jorgebastida commented on August 18, 2024

Fixed on master 0895d14

Thank you very much!

from glue.

max-mapper avatar max-mapper commented on August 18, 2024

Nice - I see how to remove the namespace but I still don't see how to remove the folder name from the sprite prefixes. Here's an example:

given I have a folder called foo that has a.png and b.png, when I do

glue foo output --namespace=""

I get .foo-a and .foo-b, is there any way to get just .a and .b?

from glue.

riebel avatar riebel commented on August 18, 2024

I have the same problem. Is it possible to get rid of the folder name? I switch my sprite CSS depending on media queries. So I need the same classes for all resolutions.

from glue.

julen avatar julen commented on August 18, 2024

There are some forks that already allow this. Any chance to merge the feature?

from glue.

jorgebastida avatar jorgebastida commented on August 18, 2024

I'm working on this feature. The approach is going to be a --sprite-namespace command that you can null .

This option is going to solve some different problems like:

  1. I want to remove all the namespaces (original issue -namespace= --sprite-namespace=):

    .cat{...}
    .dog{...}

  2. You want to use the same namespace for all the sprites even if they come from different folders (--namespace= --sprite-namespace=farm or --namespace=farm --sprite-namespace=):

    .farm-cat{...}
    .farm-dog{...}

    This is quite useful if you want to only have one namespace but you want to split sprites in different images.

  3. You want to append/prepend something to the sprite namespace (--sprite-namespace="earth-%(sprite)s"):

    .sprite-earth-catfolder-cat{...}
    .sprite-earth-dogfolder-dog{...}

The command is working, but both the sprite and the manager validator need some refactoring in order to warn if some images are going to have the same CSS class name.

It should be ready soon,
Any thoughts?

from glue.

max-mapper avatar max-mapper commented on August 18, 2024

The new commands look great

from glue.

jorgebastida avatar jorgebastida commented on August 18, 2024

I've just pushed the changes to feature/sprite-namespace
https://github.com/jorgebastida/glue/compare/feature/sprite-namespace

I'll test it and merge them down into develop in order to release them as part of 0.2.8

from glue.

jorgebastida avatar jorgebastida commented on August 18, 2024

Just released this fix as part of glue 0.2.8.
http://pypi.python.org/pypi/glue/
https://glue.readthedocs.org/en/latest/changelog.html#id1

from glue.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.