GithubHelp home page GithubHelp logo

Comments (5)

laoshu133 avatar laoshu133 commented on September 26, 2024

padding 的计算确实是疏忽了,由于项目中一般未使用 padding 也一直未发现问题,感谢指正,将尽快修复;
background-size: {N}px auto 其实是为了指定宽度,然后高度浏览器自己适配

from grunt-css-sprite.

17 avatar 17 commented on September 26, 2024

因为 background-size 默认就是 auto auto,
所以设置 background-size: {imgsize}background-size: {imgsize} auto 是没有差异的.

from grunt-css-sprite.

laoshu133 avatar laoshu133 commented on September 26, 2024

今天重新理了一遍 sprite 的流程, retina padding 值的计算确实有疏忽,但不对实际使用有影响,相反还可以减少图片体积,因为最后计算 background-size 是通过生成后的图片计算的。
另外,目前正在计划下一版发布,将支持选择器提取,不会再生成大量的 background-image, background-size

from grunt-css-sprite.

17 avatar 17 commented on September 26, 2024

NICE! 因为不用 padding 的时候, 也有些无用的 background-position 看起来不怎么爽...

from grunt-css-sprite.

laoshu133 avatar laoshu133 commented on September 26, 2024

现已更新,且发布至 npm ^_^

from grunt-css-sprite.

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.