Giter Site home page Giter Site logo

assetgraph-sprite's Issues

Support percentage dimensions

See this discussion: https://twitter.com/rachelnabors/status/573232079900581889

Resources: https://github.com/rachelnabors/pet-rachel https://github.com/rachelnabors/pet-rachel/blob/master/scss/_mixins.scss

http://rachelnabors.com/blackbrickroad/ and the style sheet is important: http://rachelnabors.com/blackbrickroad/css/styles.css

Example from stylesheet:

  /* line 112, ../sass/_mixins.scss */
  .photo7-scrap2 {
    background-position: 0 97.41567%;
    width: 1.15321%;
    padding-top: 1.15321%;
    height: 0;
    left: 16.72158%;
    top: 77.35%;
    -moz-background-size: 6171.42857% auto;
    -o-background-size: 6171.42857% auto;
    -webkit-background-size: 6171.42857% auto;
    background-size: 6171.42857% auto;
  }

  /* line 123, ../sass/_mixins.scss */
  .photo7 .scrap2 {
    background-position: 0 97.18663%;
    width: 71.16969%;
    padding-top: 22.40527%;
    height: 0;
    left: 13.34432%;
    top: 16.35%;
    -moz-background-size: 100% auto;
    -o-background-size: 100% auto;
    -webkit-background-size: 100% auto;
    background-size: 100% auto;
  }

Paddings and offsets

I've fixed some problems with wrong sprite positioning when there is added padding and there is a previous background positioning in the selector. See e3fe75b

Please publish a new version

Sprite instructions don't get removed from the CSS

When building sprites so far these two vendor specific selectors, which are only there for assetgraph-sprite, don't get removed from the resulting CSS:

-one-allow-selector-merge:true;
-one-sprite-selector:.icon;

We might want to kill every property starting with -one- before outputting to production.

Multiple definitions of sprite

I have a setup where sprite sheets are defined in sass files that are included in multiple other toplevel sass files. The result is that each output css file has a redefinition of the same sprite sheet. I hit the "Multiple definitions of spriteGroupName sprite"-error.

Is there a way to avoid this?

Ideally I'd want assetgraph-sprite to handle this case more gracefully, but I'm also ok with having to do some manual workarounds in my assetgraph transform queue.

Retina images (pixel density)

What about pixel density? I have @2x images and I can't get assetgraph-sprite to calculate the position right. Could it perhaps read the @2x filename suffix or optional background-size rules from the CSS to determine image dimensions?

spriting fails

Assetgraph got a major API revision in 6c23f75
Assetgraph-sprite got adapted to the new API in 2190980

Assetgraph got released after the API changes, but assetgraqph-sprite didn't.

This breaks assetgraph-builder from v1.3.2

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.