summaryrefslogtreecommitdiff
path: root/_sass/common/classes/_overflow.scss
blob: 6529bf0dc3585d92949198f329653ba33f4dd80d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
@mixin overflow($overflow: auto, $direction: default) {
  @if $direction == default {
    overflow: $overflow;
  } @else if $direction == "x" {
    @if $overflow == auto {
      overflow: hidden;
    }
    overflow-x: $overflow;
  } @else if $direction == "y" {
    @if $overflow == auto {
      overflow: hidden;
    }
    overflow-y: $overflow;
  }
  @if $overflow == auto {
    -webkit-overflow-scrolling: touch;
  }
}

.of-auto {
  @include overflow(auto);
}

.of-hidden {
  @include overflow(hidden);
}