HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/topswtwmobile.komma.pro/wwwroot/css/mixins/_sprites.sass
%icon-sprite
  background-image: url('/images/structure/tops_icons_sprite.svg')

=icon-sprite($x, $y, $w:0, $h:0, $center:0)
  $factor: 10

  // Calculate position in sprite
  $x1: -1px * (($x * ($factor*2)) + $factor)
  $y1: -1px * (($y * ($factor*2)) + $factor)

  // Add CSS
  background-position: $x1 $y1
  background-size: (44px * $factor) (50px * $factor)

  // Add width and height
  @if $w != 0 and $h != 0
    $newW: ($w / 10) * $factor
    $newH: ($h / 10) * $factor
    width: $newW
    height: $newH

    @if $center != 0
      position: absolute
      top: 50%
      left: 50%
      margin-top: ($newH / -2)
      margin-left: ($newW / -2)

=icon-sprite-two($position, $width: auto, $height: auto)
  background: url('/images/structure/tops_icons_sprite.svg') $position no-repeat
  background-size: 440px 500px
  width: $width
  height: $height

=icon-sprite-mobile($position, $width: auto, $height: auto)
  background: url('/images/structure/tops_mobile_sprite.svg') $position no-repeat
  background-size: 250px 170px
  width: $width
  height: $height