blob: 4c5bfb15f8dd601ff23843d9c2687f252d2c17bf [file] [log] [blame]
Michael Daviscb8bb192017-02-09 15:45:13 -06001//Breakpoints mixin
2@mixin mediaQuery($breakpoint) {
3 @if $breakpoint == "x-small" {
Derick Montague1a606be2019-05-23 21:32:28 -05004 @media (min-width: 25em) {
5 //400px
Michael Daviscb8bb192017-02-09 15:45:13 -06006 @content;
7 }
8 }
9 @if $breakpoint == "small" {
Derick Montague1a606be2019-05-23 21:32:28 -050010 @media (min-width: 47.938em) {
11 //767px
Michael Daviscb8bb192017-02-09 15:45:13 -060012 @content;
13 }
Michael Davis0f03ad12017-02-27 16:54:18 -060014 } @else if $breakpoint == "medium" {
Derick Montague1a606be2019-05-23 21:32:28 -050015 @media (min-width: 64em) {
16 //1024px
Michael Daviscb8bb192017-02-09 15:45:13 -060017 @content;
18 }
Michael Davis0f03ad12017-02-27 16:54:18 -060019 } @else if $breakpoint == "large" {
Derick Montague1a606be2019-05-23 21:32:28 -050020 @media (min-width: 85.375em) {
21 //1366px
Michael Daviscb8bb192017-02-09 15:45:13 -060022 @content;
23 }
Michael Davis0f03ad12017-02-27 16:54:18 -060024 } @else if $breakpoint == "x-large" {
Derick Montague1a606be2019-05-23 21:32:28 -050025 @media (min-width: 100em) {
26 //1600px
Michael Daviscb8bb192017-02-09 15:45:13 -060027 @content;
28 }
29 }
30}
31
32//Fonts mixin
33@mixin fontFamily {
Michael Davis0f03ad12017-02-27 16:54:18 -060034 font-family: Helvetica, Arial, Verdana, sans-serif;
Michael Daviscb8bb192017-02-09 15:45:13 -060035 font-weight: 200;
36}
37
Michael Davis51946552017-05-01 10:30:38 -050038@mixin fontFamilyBold {
39 font-family: Helvetica, Arial, Verdana, sans-serif;
40 font-weight: 700;
41}
42
Michael Davis3a0d4712017-03-27 14:01:34 -050043@mixin fontCourierBold {
Iftekharul Islam96bbf312017-08-22 13:44:38 -050044 font-family: "Courier New", Helvetica, arial, sans-serif;
Michael Davis3a0d4712017-03-27 14:01:34 -050045 font-weight: 700;
46}
47
Michael Daviscb8bb192017-02-09 15:45:13 -060048//Transitions mixin
49@mixin fastTransition-all {
Yoshie Muranaka5bd1dec2019-05-16 13:06:32 -050050 transition: all $duration--fast-02 ease;
Michael Daviscb8bb192017-02-09 15:45:13 -060051}
52
53@mixin slowTransition-all {
Yoshie Muranaka5bd1dec2019-05-16 13:06:32 -050054 transition: all $duration--slow-02 ease;
Michael Daviscb8bb192017-02-09 15:45:13 -060055}
56
Derick Montague1a606be2019-05-23 21:32:28 -050057@mixin page-transition {
58 transition: 110ms cubic-bezier(0.4, 0.14, 1, 1);
59}
60
61@mixin page-transition-visibility {
62 visibility: hidden;
63 opacity: 0;
64}
65
Michael Daviscb8bb192017-02-09 15:45:13 -060066//Custom SVG arrow
67@mixin bgImage__arrowDown-primary {
Yoshie Muranakade382082019-04-30 13:56:10 -050068 background-image: url(../assets/images/icon-caret-down.svg);
69 background-size: 0.8em;
70 background-repeat: no-repeat;
71 background-position-y: center;
Derick Montague1a606be2019-05-23 21:32:28 -050072 background-position-x: calc(100% - 0.5em);
Michael Daviscb8bb192017-02-09 15:45:13 -060073}
74
Yoshie Muranakade382082019-04-30 13:56:10 -050075@mixin bgImage__arrowDown-disabled {
76 background-image: url(../assets/images/icon-caret-down-disabled.svg);
77 background-size: 0.8em;
78 background-repeat: no-repeat;
79 background-position-y: center;
Derick Montague1a606be2019-05-23 21:32:28 -050080 background-position-x: calc(100% - 0.5em);
Michael Daviscb8bb192017-02-09 15:45:13 -060081}
Michael Davisc5626182017-03-10 15:48:05 -060082
Iftekharul Islam8947e702017-07-27 10:28:07 -050083@mixin calcColumn-5 {
Derick Montague1a606be2019-05-23 21:32:28 -050084 min-width: calc(100% * (1 / 5) - 5px);
Iftekharul Islam8947e702017-07-27 10:28:07 -050085}
Iftekharul Islamcd789502017-04-19 14:37:55 -050086
Derick Montague1a606be2019-05-23 21:32:28 -050087@mixin calcColumn-4($offset: 0) {
88 min-width: calc(100% * (1 / 4) - #{$offset});
Michael Davis994a93b2017-04-18 10:01:04 -050089}
90
Iftekharul Islamcd789502017-04-19 14:37:55 -050091@mixin calcColumn-3 {
Derick Montague1a606be2019-05-23 21:32:28 -050092 min-width: calc(100% * (1 / 3) - 5px);
Michael Davis994a93b2017-04-18 10:01:04 -050093}
94
Iftekharul Islamcd789502017-04-19 14:37:55 -050095@mixin calcSplitColumn {
Derick Montague1a606be2019-05-23 21:32:28 -050096 min-width: calc(100% * (1 / 2) - 5px);
Michael Davis994a93b2017-04-18 10:01:04 -050097}
98
Michael Davis51946552017-05-01 10:30:38 -050099@mixin vertCenter {
100 top: 50%;
101 transform: translateY(-50%);
102}
Michael Davis994a93b2017-04-18 10:01:04 -0500103
Michael Davisc5626182017-03-10 15:48:05 -0600104@mixin indeterminate-bar {
Derick Montague1a606be2019-05-23 21:32:28 -0500105 background-image: repeating-linear-gradient(
106 -45deg,
107 rgba(251, 234, 174, 0.35),
108 rgba(251, 234, 174, 0.35) 25px,
109 rgba(244, 176, 0, 0.45) 25px,
110 rgba(244, 176, 0, 0.45) 50px
111 );
Michael Davisc5626182017-03-10 15:48:05 -0600112 -webkit-animation: progress 2s linear infinite;
113 -moz-animation: progress 2s linear infinite;
114 animation: progress 2s linear infinite;
Michael Davis9486f542017-05-30 15:35:31 -0500115 background-size: 165% 100%;
Michael Davisc5626182017-03-10 15:48:05 -0600116
117 @-webkit-keyframes progress {
118 0% {
Michael Davis9486f542017-05-30 15:35:31 -0500119 background-position: -70px 0;
Michael Davisc5626182017-03-10 15:48:05 -0600120 }
121 100% {
Michael Davis9486f542017-05-30 15:35:31 -0500122 background-position: 0 0;
Michael Davisc5626182017-03-10 15:48:05 -0600123 }
124 }
125
126 @-moz-keyframes progress {
127 0% {
Michael Davis9486f542017-05-30 15:35:31 -0500128 background-position: -70px 0;
Michael Davisc5626182017-03-10 15:48:05 -0600129 }
130 100% {
Michael Davis9486f542017-05-30 15:35:31 -0500131 background-position: 0 0;
Michael Davisc5626182017-03-10 15:48:05 -0600132 }
133 }
134
135 @-ms-keyframes progress {
136 0% {
Michael Davis9486f542017-05-30 15:35:31 -0500137 background-position: -70px 0;
Michael Davisc5626182017-03-10 15:48:05 -0600138 }
139 100% {
Michael Davis9486f542017-05-30 15:35:31 -0500140 background-position: 0 0;
Michael Davisc5626182017-03-10 15:48:05 -0600141 }
142 }
143
144 @keyframes progress {
145 0% {
Michael Davis9486f542017-05-30 15:35:31 -0500146 background-position: -70px 0;
Michael Davisc5626182017-03-10 15:48:05 -0600147 }
148 100% {
Michael Davis9486f542017-05-30 15:35:31 -0500149 background-position: 0 0;
Michael Davisc5626182017-03-10 15:48:05 -0600150 }
151 }
152}
Michael Davis9486f542017-05-30 15:35:31 -0500153
154@mixin table-row-save {
155 @-webkit-keyframes row-flash {
Derick Montague1a606be2019-05-23 21:32:28 -0500156 from {
Yoshie Muranaka6f7ec802019-06-24 14:35:41 -0500157 background-color: $background-02;
Derick Montague1a606be2019-05-23 21:32:28 -0500158 }
159 to {
160 background-color: inherit;
161 }
Michael Davis9486f542017-05-30 15:35:31 -0500162 }
163 @-moz-keyframes row-flash {
Derick Montague1a606be2019-05-23 21:32:28 -0500164 from {
Yoshie Muranaka6f7ec802019-06-24 14:35:41 -0500165 background-color: $background-02;
Derick Montague1a606be2019-05-23 21:32:28 -0500166 }
167 to {
168 background-color: inherit;
169 }
Michael Davis9486f542017-05-30 15:35:31 -0500170 }
171 @-o-keyframes row-flash {
Derick Montague1a606be2019-05-23 21:32:28 -0500172 from {
Yoshie Muranaka6f7ec802019-06-24 14:35:41 -0500173 background-color: $background-02;
Derick Montague1a606be2019-05-23 21:32:28 -0500174 }
175 to {
176 background-color: inherit;
177 }
Michael Davis9486f542017-05-30 15:35:31 -0500178 }
179 @keyframes row-flash {
Derick Montague1a606be2019-05-23 21:32:28 -0500180 from {
Yoshie Muranaka6f7ec802019-06-24 14:35:41 -0500181 background-color: $background-02;
Derick Montague1a606be2019-05-23 21:32:28 -0500182 }
183 to {
184 background-color: inherit;
185 }
Michael Davis9486f542017-05-30 15:35:31 -0500186 }
187 .row-flash {
188 -webkit-animation: row-flash 1s infinite; /* Safari 4+ */
Derick Montague1a606be2019-05-23 21:32:28 -0500189 -moz-animation: row-flash 1s infinite; /* Fx 5+ */
190 -o-animation: row-flash 1s infinite; /* Opera 12+ */
191 animation: row-flash 1s infinite; /* IE 10+ */
Michael Davis9486f542017-05-30 15:35:31 -0500192 }
Derick Montague1a606be2019-05-23 21:32:28 -0500193}
Dixsie Wolmersc652ed12019-07-19 13:03:28 -0500194
195@mixin label {
196 color: $text-02;
197 text-transform: uppercase;
198 font-weight: 700;
199 font-size: 0.75em;
200 margin-bottom: 0.5rem;
201}