blob: e95d9499866daf9b4557063651e1a7b87b3246e5 [file] [log] [blame]
Michael Daviscb8bb192017-02-09 15:45:13 -06001//Breakpoints mixin
2@mixin mediaQuery($breakpoint) {
3 @if $breakpoint == "x-small" {
4 @media (min-width: 25.000em) { //400px
5 @content;
6 }
7 }
8 @if $breakpoint == "small" {
9 @media (min-width: 47.938em) { //767px
10 @content;
11 }
Michael Davis0f03ad12017-02-27 16:54:18 -060012 } @else if $breakpoint == "medium" {
Michael Daviscb8bb192017-02-09 15:45:13 -060013 @media (min-width: 64.000em) { //1024px
14 @content;
15 }
Michael Davis0f03ad12017-02-27 16:54:18 -060016 } @else if $breakpoint == "large" {
Michael Daviscb8bb192017-02-09 15:45:13 -060017 @media (min-width: 85.375em) { //1366px
18 @content;
19 }
Michael Davis0f03ad12017-02-27 16:54:18 -060020 } @else if $breakpoint == "x-large" {
Michael Daviscb8bb192017-02-09 15:45:13 -060021 @media (min-width: 100.000em) { //1600px
22 @content;
23 }
24 }
25}
26
27//Fonts mixin
28@mixin fontFamily {
Michael Davis0f03ad12017-02-27 16:54:18 -060029 font-family: Helvetica, Arial, Verdana, sans-serif;
Michael Daviscb8bb192017-02-09 15:45:13 -060030 font-weight: 200;
31}
32
Michael Davis51946552017-05-01 10:30:38 -050033@mixin fontFamilyBold {
34 font-family: Helvetica, Arial, Verdana, sans-serif;
35 font-weight: 700;
36}
37
Michael Davis3a0d4712017-03-27 14:01:34 -050038@mixin fontCourierBold {
Iftekharul Islam96bbf312017-08-22 13:44:38 -050039 font-family: "Courier New", Helvetica, arial, sans-serif;
Michael Davis3a0d4712017-03-27 14:01:34 -050040 font-weight: 700;
41}
42
Michael Davis51946552017-05-01 10:30:38 -050043
Michael Daviscb8bb192017-02-09 15:45:13 -060044//Transitions mixin
45@mixin fastTransition-all {
46 transition: all .5s ease;
47}
48
49@mixin slowTransition-all {
50 transition: all 1.5s ease;
51}
52
53//Custom SVG arrow
54@mixin bgImage__arrowDown-primary {
Yoshie Muranakade382082019-04-30 13:56:10 -050055 background-image: url(../assets/images/icon-caret-down.svg);
56 background-size: 0.8em;
57 background-repeat: no-repeat;
58 background-position-y: center;
59 background-position-x: calc(100% - .5em);
Michael Daviscb8bb192017-02-09 15:45:13 -060060}
61
Yoshie Muranakade382082019-04-30 13:56:10 -050062@mixin bgImage__arrowDown-disabled {
63 background-image: url(../assets/images/icon-caret-down-disabled.svg);
64 background-size: 0.8em;
65 background-repeat: no-repeat;
66 background-position-y: center;
67 background-position-x: calc(100% - .5em);
Michael Daviscb8bb192017-02-09 15:45:13 -060068}
Michael Davisc5626182017-03-10 15:48:05 -060069
Iftekharul Islam8947e702017-07-27 10:28:07 -050070@mixin calcColumn-5 {
71 min-width: calc(100% * (1/5) - 5px);
72}
Iftekharul Islamcd789502017-04-19 14:37:55 -050073
Michael Davis994a93b2017-04-18 10:01:04 -050074@mixin calcColumn-4 ($offset: 0) {
75 min-width: calc(100% * (1/4) - #{$offset});
76}
77
Iftekharul Islamcd789502017-04-19 14:37:55 -050078@mixin calcColumn-3 {
79 min-width: calc(100% * (1/3) - 5px);
Michael Davis994a93b2017-04-18 10:01:04 -050080}
81
Iftekharul Islamcd789502017-04-19 14:37:55 -050082@mixin calcSplitColumn {
83 min-width: calc(100% * (1/2) - 5px);
Michael Davis994a93b2017-04-18 10:01:04 -050084}
85
Michael Davis51946552017-05-01 10:30:38 -050086@mixin vertCenter {
87 top: 50%;
88 transform: translateY(-50%);
89}
Michael Davis994a93b2017-04-18 10:01:04 -050090
Michael Davisc5626182017-03-10 15:48:05 -060091@mixin indeterminate-bar {
92 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);
93 -webkit-animation: progress 2s linear infinite;
94 -moz-animation: progress 2s linear infinite;
95 animation: progress 2s linear infinite;
Michael Davis9486f542017-05-30 15:35:31 -050096 background-size: 165% 100%;
Michael Davisc5626182017-03-10 15:48:05 -060097
98 @-webkit-keyframes progress {
99 0% {
Michael Davis9486f542017-05-30 15:35:31 -0500100 background-position: -70px 0;
Michael Davisc5626182017-03-10 15:48:05 -0600101 }
102 100% {
Michael Davis9486f542017-05-30 15:35:31 -0500103 background-position: 0 0;
Michael Davisc5626182017-03-10 15:48:05 -0600104 }
105 }
106
107 @-moz-keyframes progress {
108 0% {
Michael Davis9486f542017-05-30 15:35:31 -0500109 background-position: -70px 0;
Michael Davisc5626182017-03-10 15:48:05 -0600110 }
111 100% {
Michael Davis9486f542017-05-30 15:35:31 -0500112 background-position: 0 0;
Michael Davisc5626182017-03-10 15:48:05 -0600113 }
114 }
115
116 @-ms-keyframes progress {
117 0% {
Michael Davis9486f542017-05-30 15:35:31 -0500118 background-position: -70px 0;
Michael Davisc5626182017-03-10 15:48:05 -0600119 }
120 100% {
Michael Davis9486f542017-05-30 15:35:31 -0500121 background-position: 0 0;
Michael Davisc5626182017-03-10 15:48:05 -0600122 }
123 }
124
125 @keyframes progress {
126 0% {
Michael Davis9486f542017-05-30 15:35:31 -0500127 background-position: -70px 0;
Michael Davisc5626182017-03-10 15:48:05 -0600128 }
129 100% {
Michael Davis9486f542017-05-30 15:35:31 -0500130 background-position: 0 0;
Michael Davisc5626182017-03-10 15:48:05 -0600131 }
132 }
133}
Michael Davis9486f542017-05-30 15:35:31 -0500134
135@mixin table-row-save {
136 @-webkit-keyframes row-flash {
137 from { background-color: $lightblue; }
138 to { background-color: inherit; }
139 }
140 @-moz-keyframes row-flash {
141 from { background-color: $lightblue; }
142 to { background-color: inherit; }
143 }
144 @-o-keyframes row-flash {
145 from { background-color: $lightblue; }
146 to { background-color: inherit; }
147 }
148 @keyframes row-flash {
149 from { background-color: $lightblue; }
150 to { background-color: inherit; }
151 }
152 .row-flash {
153 -webkit-animation: row-flash 1s infinite; /* Safari 4+ */
154 -moz-animation: row-flash 1s infinite; /* Fx 5+ */
155 -o-animation: row-flash 1s infinite; /* Opera 12+ */
156 animation: row-flash 1s infinite; /* IE 10+ */
157 }
158}