about summary refs log tree commit diff
path: root/app/javascript/styles/_mixins.scss
blob: 7412991b8be236cb0545453e0ed385d1c5d7383c (plain) (blame)
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
@mixin avatar-radius() {
  border-radius: $ui-avatar-border-size;
  background: transparent no-repeat;
  background-position: 50%;
  background-clip: padding-box;
}

@mixin avatar-size($size:48px) {
  width: $size;
  height: $size;
  background-size: $size $size;
}

@mixin single-column($media, $parent: '&') {
  .auto-columns #{$parent} {
    @media #{$media} {
      @content;
    }
  }
  .single-column #{$parent} {
    @content;
  }
}

@mixin limited-single-column($media, $parent: '&') {
  .auto-columns #{$parent}, .single-column #{$parent} {
    @media #{$media} {
      @content;
    }
  }
}

@mixin multi-columns($media, $parent: '&') {
  .auto-columns #{$parent} {
    @media #{$media} {
      @content;
    }
  }
  .multi-columns #{$parent} {
    @content;
  }
}