icon.less 1.21 KB
@import "sprite";

//retina @2x

.sprite-width(@sprite) {
  width: extract(@sprite, 5)/2;
}

.sprite-height(@sprite) {
  height: extract(@sprite, 6)/2;
}

.sprite-position(@sprite) {
  @sprite-offset-x: extract(@sprite, 3)/2;
  @sprite-offset-y: extract(@sprite, 4)/2;
  background-position: @sprite-offset-x @sprite-offset-y;
}

.sprite-background-size(@spritesheet-width) {
  	background-size: @spritesheet-width/2;
}

.sprite-image(@sprite) {
  @sprite-image: extract(@sprite, 9);
  @sprite-image-bare: ~`"@{sprite-image}".slice(1, -1)`;
  background-image: url(@sprite-image-bare);
}

.sprite(@sprite) {
  .sprite-image(@sprite);
  .sprite-position(@sprite);
  .sprite-width(@sprite);
  .sprite-height(@sprite);
  .sprite-background-size(@spritesheet-width);
}


//合并图
.m-icon{
	display: inline-block;
	vertical-align: middle;
}


.sprites(@spritesheet-sprites);
//自定义 非合并图

//首页状态 icon
.icon-cert{
	.icon-state_yanzheng;
}

.icon-certing{
	.icon-state_zhong;
}

.icon-certinvalid{
	.icon-state_wei;
}

.icon-amount{
	.icon-state_bao;
}

.icon-lock{
	.icon-state_suo;
}
.icon-road{
	.icon-state_xianlu;
}
.icon-state_zhaohuo {
	background: url(../images/s.gif) no-repeat 0 0;
	background-size: 150px 150px;
}