Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
fis-spriter-csssprites
Advanced tools
基于FIS的csssprites,通过FIS插件的方式对合并后的css进行csssprites处理。其支持repeat-x, repeat-y, background-position
npm install -g fis-spriter-csssprites
fis.config.merge({
namespace: 'demo',
modules: {
spriter: 'csssprites'
},
pack: {
'aio.css': [
'**.css'
]
},
settings: {
smarty: {
left_delimiter: '{%',
right_delimiter: '%}',
},
spriter: {
csssprites: {
margin: 10
}
}
}
});
工具通过图片添加query识别图片是否需要做图片合并,具体
query | 说明 |
---|---|
?m=x | 图片需要repeat-x时,通过?m=x来标识 |
?m=y | 图片需要repeat-y时,通过?m=y来标识 |
?m=z | 图片不需要任何重复时,通过?m=z来标识 |
###实例
.header {
background: url(/img/head_bg.png?m=x) repeat-x;
}
.nav {
background: url(/img/nav_bg.png?m=y) repeat-y;
}
.icon_add {
background: url(/img/icon/add.jpg?m=z) no-repeat;
}
.icon_mul {
background: url(/img/icon/mul.jpg?m=z) no-repeat;
}
如上,head_bg.png
会合并到aio_x.png
(aio.css对应图片), nav_bg.png
合并到aio_y.png
, add.jpg
和mul.jpg
被合并到aio_z.png
。
FAQs
基于fis的csssprite,支持repeat-x,repeat-x,background-position
We found that fis-spriter-csssprites demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.