30
Lets say I wrote a simple CSS rule like this:
.star_10 {
background: url(stars.png) no-repeat 0 0;
}
And I need 10, so I copied it 9 times.
.star_10 {
background: url(stars.png) no-repeat 0 0;
}
.star_10 {
background: url(stars.png) no-repeat 0 0;
}
.star_10 {
background: url(stars.png) no-repeat 0 0;
}
.star_10 {
background: url(stars.png) no-repeat 0 0;
}
.star_10 {
background: url(stars.png) no-repeat 0 0;
}
etc.
Now I want to change the star_10 and 0 0 with incremented values so it looks like this:
.star_10 {
background: url(stars.png) no-repeat 0 0;
}
.star_9 {
background: url(stars.png) no-repeat 0 -18px;
}
.star_8 {
background: url(stars.png) no-repeat 0 -36px;
}
.star_7 {
background: url(stars.png) no-repeat 0 -54px;
}
and so on...
So how can I search/replace every instance, do a calculation and write it?