summaryrefslogtreecommitdiff
path: root/sass/abstracts/_mixins.scss
blob: f50cc17db01ed41b1c933b76a541be811e880dec (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
@use "variables" as *;

@mixin main-link-hover {
  color: $text-special-light;
  transform: translateY(-0.3rem);
}

@mixin flex-sp-around-center {
  display: flex;
  align-items: center;
  justify-content: space-around;
}

@mixin flex-column-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

@mixin standard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  justify-content: center;
}

@mixin wide-container {
  margin: 10rem auto;
  width: 80%;

  h2 {
    margin-bottom: 5rem;
  }
}

@mixin medium-container {
  margin: 8rem auto;
  width: 80%;
}

@mixin mobile-container {
  margin: 3rem auto;
}

// media queries
@mixin responsive($breakpoint) {
  @if $breakpoint == phone {
    @media screen and (max-width: 600px) {
      @content;
    }
  }
  @if $breakpoint == tablet {
    @media screen and (max-width: 980px) {
      @content;
    }
  }
  @if $breakpoint == laptop {
    @media screen and (max-width: 1400px) {
      @content;
    }
  }
}