Closed ccasalengua closed 7 years ago
Hey @ccasalengua,
You don't need a background-repeat
property because every element that uses the sprite should have width & height
properties. 😄
This is a possible solution but I need the background-repeat: no-repeat
for another type.
Thanks for your help!
I have a simple problem:
When the final file is generated, the background-repeat is deleted. I try to apply it below but it does not work ...
This is my code:
Input:
.postcss-img { background: url(../assets/img/sprite/ico-accordion.png) no-repeat 0 0 transparent; background-repeat: no-repeat; } .postcss-img2 { background: url(../assets/img/sprite/ico-accordion-open.png) no-repeat 0 0 transparent; background-repeat: no-repeat; }
Output:
.postcss-img { background-image: url(../assets/img/sprite/sprite.png); background-position: 0px 0px; background-size: 42px 21px; } .postcss-img2 { background-image: url(../assets/img/sprite/sprite.png); background-position: -21px 0px; background-size: 42px 21px; }
Can you help me? Thanks