Skip to content

Instantly share code, notes, and snippets.

@8cris2
Created February 26, 2016 10:14
Show Gist options
  • Save 8cris2/61af9251bd1dd5a84b28 to your computer and use it in GitHub Desktop.
Save 8cris2/61af9251bd1dd5a84b28 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
$btn_className: ("edit_btn", "home_btn", "back_btn", "next_btn", "delete_btn", "filter_btn", "accept_btn", "cancel_btn");
$btn_bPosition: (-2px -54px, 0px -106px, 0px -159px, 0px -212px, 0px -265px, 0px -319px, 0px -371px, 0px -424px);
$btn_hover: (-49px -54px, -47px -106px, -47px -159px, -47px -212px, -47px -265px, -47px -319px, -47px -371px, -47px -424px);
@for $i from 1 to length($btn_className) {
$this_btnPos: nth($btn_bPosition, $i);
$this_btnHov: nth($btn_hover, $i);
&.#{nth($btn_className, $i)} {
background-position: $this_btnPos;
&:hover {
background-position: $this_btnHov;
}
}
}
.edit_btn {
background-position: -2px -54px;
}
.edit_btn:hover {
background-position: -49px -54px;
}
.home_btn {
background-position: 0px -106px;
}
.home_btn:hover {
background-position: -47px -106px;
}
.back_btn {
background-position: 0px -159px;
}
.back_btn:hover {
background-position: -47px -159px;
}
.next_btn {
background-position: 0px -212px;
}
.next_btn:hover {
background-position: -47px -212px;
}
.delete_btn {
background-position: 0px -265px;
}
.delete_btn:hover {
background-position: -47px -265px;
}
.filter_btn {
background-position: 0px -319px;
}
.filter_btn:hover {
background-position: -47px -319px;
}
.accept_btn {
background-position: 0px -371px;
}
.accept_btn:hover {
background-position: -47px -371px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment