Created
February 11, 2014 19:11
Revisions
-
joshkehn revised this gist
Feb 11, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ // Background with hover state and preloading mixin. .background-with-hover ($initial; $hover) { background-image: url($initial); &:before { content: url($hover); -
joshkehn created this gist
Feb 11, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ .arrow { background: url("../images/arrow-normal.svg") no-repeat top center; } .arrow:before { background: url("../images/arrow-hover.svg"); display: none; } .arrow:hover { background: url("../images/arrow-hover.svg"); } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ // Background with hover state and preloading mixin. .background-with-hover ($initial, $hover) { background-image: url($initial); &:before { content: url($hover); display: none; } &:hover { background-image: url($hover); } } // Usage example with the arrow above .arrow { background: no-repeat top center; .background-with-hover("../images/arrow-normal.svg", "../images/arrow-hover.svg"); }