Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. a#something {
  2. background: url('path');
  3.  
  4. &.selected {
  5. background: url($path + '-selected');
  6. }
  7. }
  8.  
  9. @mixin selected-icon-background($path, $ext) {
  10. background: url($path + '.' + $ext);
  11.  
  12. &.selected {
  13. background: url($path + '-selected' + '.' + $ext);
  14. }
  15. }
  16.  
  17. ___ Used :
  18.  
  19. a#something {
  20. @include selected-icon-background('images/icons/home', 'png');
  21. }
  22.  
  23. a#something {
  24. background: url('images/icons/home.png');
  25. }
  26.  
  27. a#something.selected {
  28. background: url('images/icons/home-selected.png');
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement