personal-site/sass/_mixins.scss -rw-r--r-- 999 bytes View raw
                                                                                
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
// Mixins
@mixin horizontal-list($list-margin: 0 8px 0 0) {
  display: inline-block;
  position: relative;
  margin: 0;
  padding: 0;
  li {
    display: inline-block;
    position: relative;
    margin: $list-margin;
    padding: 0;
    &:last-of-type {margin-right: 0;}
    a {
      display: inline-block;
      &:hover {
        cursor: pointer;
        cursor: hand;
      }
    }
  }
}

// transition taken from https://codepen.io/gc-nomade/pen/grRmBw
@mixin anchor-style() {
  a{
    text-decoration: none;
    border-bottom: 1px dotted;

    &:hover {
      border-bottom: 2px solid;
    }
  }
}

@mixin anchor-colors(
  $color: $primary, $color_hover: $primary_hover) {
  a {
    color: $color;

    &:hover {
      color: $color_hover;
    }
  }
}

@mixin wrap-word() {
  white-space: pre-wrap;       /* css-3 */
  white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
  white-space: -pre-wrap;      /* Opera 4-6 */
  white-space: -o-pre-wrap;    /* Opera 7 */
  word-wrap: break-word;
}