summaryrefslogtreecommitdiffstats
path: root/app/common/styles/base/mixins.scss
blob: 6067a0e376d117c2cced4c180a044dda5cf8b08f (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
//Breakpoints mixin
@mixin mediaQuery($breakpoint) {
  @if $breakpoint == "x-small" {
    @media (min-width: 25.000em) { //400px
      @content;
    }
  }
  @if $breakpoint == "small" {
    @media (min-width: 47.938em) { //767px
      @content;
    }
  } @else if $breakpoint == "medium" {
    @media (min-width: 64.000em) { //1024px
      @content;
    }
  } @else if $breakpoint == "large" {
    @media (min-width: 85.375em) { //1366px
      @content;
    }
  } @else if $breakpoint == "x-large" {
    @media (min-width: 100.000em) { //1600px
      @content;
    }
  }
}

//Fonts mixin
@mixin fontFamily {
  font-family: Helvetica, Arial, Verdana, sans-serif;
  font-weight: 200;
}

@mixin fontFamilyBold {
  font-family: Helvetica, Arial, Verdana, sans-serif;
  font-weight: 700;
}

@mixin fontCourierBold {
  font-family: "Courier New", Helvetica, arial, sans-serif;
  font-weight: 700;
}


//Transitions mixin
@mixin fastTransition-all {
  transition: all .5s ease;
}

@mixin slowTransition-all {
  transition: all 1.5s ease;
}

//Custom SVG arrow
@mixin bgImage__arrowDown-primary {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='32' height='24' viewBox='0 0 32 24'><polygon points='0,0 32,0 16,24' style='fill: #19273c'></polygon></svg>");
}

@mixin bgImage__arrowDown-accent {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='32' height='24' viewBox='0 0 32 24'><polygon points='0,0 32,0 16,24' style='fill: #3c6df0'></polygon></svg>");
}

@mixin bgImage__arrowDown-grey {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='32' height='24' viewBox='0 0 32 24'><polygon points='0,0 32,0 16,24' style='fill: #b8c1c1'></polygon></svg>");
}

@mixin calcColumn-5 {
  min-width: calc(100% * (1/5) - 5px);
}

@mixin calcColumn-4 ($offset: 0) {
  min-width: calc(100% * (1/4) - #{$offset});
}

@mixin calcColumn-3 {
  min-width: calc(100% * (1/3) - 5px);
}

@mixin calcSplitColumn {
  min-width: calc(100% * (1/2) - 5px);
}

@mixin vertCenter {
  top: 50%;
  transform: translateY(-50%);
}

@mixin indeterminate-bar {
  background-image: repeating-linear-gradient(-45deg, rgba(251, 234, 174, 0.35), rgba(251, 234, 174, 0.35) 25px, rgba(244, 176, 0, 0.45) 25px, rgba(244, 176, 0, 0.45) 50px);
  -webkit-animation: progress 2s linear infinite;
  -moz-animation: progress 2s linear infinite;
  animation: progress 2s linear infinite;
  background-size: 165% 100%;

  @-webkit-keyframes progress {
    0% {
      background-position: -70px 0;
    }
    100% {
      background-position: 0 0;
    }
  }

  @-moz-keyframes progress {
    0% {
      background-position: -70px 0;
    }
    100% {
      background-position: 0 0;
    }
  }

  @-ms-keyframes progress {
    0% {
      background-position: -70px 0;
    }
    100% {
      background-position: 0 0;
    }
  }

  @keyframes progress {
    0% {
      background-position: -70px 0;
    }
    100% {
      background-position: 0 0;
    }
  }
}

@mixin table-row-save {
  @-webkit-keyframes row-flash {
    from { background-color: $lightblue; }
    to { background-color: inherit; }
  }
  @-moz-keyframes row-flash {
    from { background-color: $lightblue; }
    to { background-color: inherit; }
  }
  @-o-keyframes row-flash {
    from { background-color: $lightblue; }
    to { background-color: inherit; }
  }
  @keyframes row-flash {
    from { background-color: $lightblue; }
    to { background-color: inherit; }
  }
  .row-flash {
    -webkit-animation: row-flash 1s infinite; /* Safari 4+ */
    -moz-animation:    row-flash 1s infinite; /* Fx 5+ */
    -o-animation:      row-flash 1s infinite; /* Opera 12+ */
    animation:         row-flash 1s infinite; /* IE 10+ */
  }
}
OpenPOWER on IntegriCloud