-
Notifications
You must be signed in to change notification settings - Fork 3
Sprites helper
List of the available mixins
===
####sprite
Sets a sprite to a selector, it's useful for non-retina or SVG sprites
Param | Default value | Required | Comment |
---|---|---|---|
@image |
none | yes | |
@width |
none | yes | |
@height |
@width |
no | |
@backgroundSize |
auto |
no | |
@rootPath |
@root-path or ''
|
no | Frontsize var from app.less
|
===
####spritePosition
Sets a sprite coordinate for a sprite selector adjoining class, a faster way to do it is setSprite mixin
Param | Default value | Required |
---|---|---|
@horizontalPosition |
0 |
no |
@verticalPosition |
0 |
no |
@width |
0 |
no |
@height |
@width |
no |
===
####spriteCoordinates
Sets the sprite negative coordinates to be used with px
(it adds -
symbol automatically), this is an old mixin, a faster way to do it is setSprite mixin
Param | Default value | Required |
---|---|---|
@positionX |
0 |
no |
@positionY |
0 |
no |
===
####setSprite
Adds an adjoining class selector to the container sprite
Param | Default value | Required | Comment |
---|---|---|---|
@selector |
none | yes | |
@horizontalPosition |
0 |
yes | |
@verticalPosition |
0 |
yes | |
@width |
0 |
yes | |
@height |
@width |
no | |
@scale |
1 |
no |
===
####scaleSprite
Scales background-size
of the sprite and the selector's html element size
Param | Default value | Required | Comment |
---|---|---|---|
@scale |
none | yes | |
@spriteWidth |
none | yes | |
@spriteHeight |
none | yes | |
@backgroundWidth |
none | yes | |
@backgroundHeight |
none | yes |
===
####scaleBackgroundSize
Scales background-size
of the selector, a faster way to do it is scaleSprite mixin
Param | Default value | Required | Comment |
---|---|---|---|
@scale |
none | yes | |
@width |
none | yes | |
@height |
@width |
no |
===
####spriteRetina
Sets a sprite to a selector, with retina and non retina media query
Param | Default value | Required | Comment |
---|---|---|---|
@defaultImage |
none | yes | |
@retinaImage |
none | yes | |
@width |
none | yes | |
@height |
@width |
yes | |
@imageWidth |
none | yes | |
@imageHeight |
none | yes | |
@rootPath |
@root-path or ''
|
no | Frontsize var from app.less
|