Advertisement
Guest User

Untitled

a guest
Jan 20th, 2017
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SAS 2.23 KB | None | 0 0
  1. @mixin mask($iconName, $size: 24, $color: black) {
  2.     $url: "/Content/Icons/black/#{$size}/#{$iconName}.svg";
  3.  
  4.     background-color: transparent;
  5.     width: $size + px;
  6.     height: $size + px;
  7.     position: relative;
  8.     z-index: 1;
  9.  
  10.     &:before {
  11.         content: '';
  12.         background-image: url(/Content/Icons/#{$color}/#{$size}/#{$iconName}_#{$size}.svg);
  13.         opacity: $opacity-low;
  14.         position: absolute;
  15.         top: 0;
  16.         left: 0;
  17.         z-index: -1;
  18.         width: $size + px;
  19.         height: $size + px;
  20.     }
  21.  
  22.     &.white {
  23.         &:before {
  24.             background-image: url(/Content/Icons/white/#{$size}/#{$iconName}_#{$size}.svg);
  25.         }
  26.     }
  27.  
  28.     .menuOptions li.active &, .menuOptions li:hover & {
  29.         &.mediaIcon::before {
  30.             background-image: url(/Content/Icons/white/#{$size}/#{$iconName}_#{$size}.svg);
  31.             opacity: $opacity-full;
  32.         }
  33.     }
  34.  
  35.     li.active &, li:hover & {
  36.         &.mediaIcon::before {
  37.             opacity: $opacity-medium;
  38.         }
  39.     }
  40.  
  41.     &.opacity-ultraminimal {
  42.         &:before {
  43.             opacity: $opacity-ultraminimal;
  44.         }
  45.     }
  46.  
  47.     &.opacity-halfminimal {
  48.         &:before {
  49.             opacity: $opacity-halfminimal;
  50.         }
  51.     }
  52.  
  53.     &.opacity-minimal {
  54.         &:before {
  55.             opacity: $opacity-minimal;
  56.         }
  57.     }
  58.  
  59.     &.opacity-low {
  60.         &:before {
  61.             opacity: $opacity-low;
  62.         }
  63.     }
  64.  
  65.     &.opacity-medium {
  66.         &:before {
  67.             opacity: $opacity-medium;
  68.         }
  69.     }
  70.  
  71.     &.opacity-high {
  72.         &:before {
  73.             opacity: $opacity-high;
  74.         }
  75.     }
  76.  
  77.     &.opacity-full {
  78.         &:before {
  79.             opacity: $opacity-full;
  80.         }
  81.     }
  82.  
  83.     &.mediaIconHoverable {
  84.         @include transition(opacity, 0.2s, ease);
  85.  
  86.         &:hover {
  87.             &:before {
  88.                 @include transition(opacity, 0.2s, ease);
  89.                 opacity: $opacity-medium;
  90.             }
  91.         }
  92.  
  93.         &:active {
  94.             &:before {
  95.                 @include transition(opacity, 0.2s, ease);
  96.                 opacity: $opacity-medium;
  97.             }
  98.         }
  99.     }
  100.  
  101.     &:hover, &:active, &:focus, &:visited {
  102.     }
  103. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement