@codecademy/gamut-styles 18.0.1-alpha.f6b2ce.0 → 19.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,22 +2,7 @@
2
2
 
3
3
  Base SCSS for Codecademy
4
4
 
5
- ## Variables/
6
-
7
- This folder houses all shared SCSS style variables.
8
- It also contains a JavaScript file with color variables.
9
-
10
5
  ## Core/
11
6
 
12
7
  This folder contains a base stylesheet for the app.
13
8
  This should be imported **once** in your application.
14
-
15
- ## Utils/
16
-
17
- This folder contains Sass functions (pure utilities with no stylesheet output values) and mixins (outputs CSS)
18
- to be used as needed both in Gamut and across the Codecademy app.
19
-
20
- The `utils.scss` and `core.scss` just import the index files from their respective folders, to make the syntax to import them from elsewhere easier, e.g.:
21
-
22
- `@use "~@codecademy/gamut-styles/utils";`
23
- `@use "~@codecademy/gamut-styles/core";`
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@codecademy/gamut-styles",
3
3
  "description": "Styleguide & Component library for codecademy.com",
4
- "version": "18.0.1-alpha.f6b2ce.0",
4
+ "version": "19.0.0",
5
5
  "author": "Jake Hiller <jake@codecademy.com>",
6
6
  "dependencies": {
7
- "@codecademy/variance": "0.26.2-alpha.f6b2ce.0",
7
+ "@codecademy/variance": "0.26.1",
8
8
  "@emotion/is-prop-valid": "^1.1.0",
9
9
  "framer-motion": "^11.18.0",
10
10
  "get-nonce": "^1.0.0",
package/core/_fonts.scss DELETED
@@ -1,131 +0,0 @@
1
- @font-face {
2
- font-family: "Nunito Sans";
3
- font-display: swap;
4
- src: url("../fonts/Nunito_Sans/nunitosans-regular-webfont.eot");
5
- src: url("../fonts/Nunito_Sans/nunitosans-regular-webfont.woff2")
6
- format("woff2"),
7
- url("../fonts/Nunito_Sans/nunitosans-regular-webfont.woff") format("woff"),
8
- url("../fonts/Nunito_Sans/nunitosans-regular-webfont.ttf") format("ttf");
9
- font-weight: normal;
10
- }
11
-
12
- @font-face {
13
- font-family: "Nunito Sans";
14
- font-display: swap;
15
- src: url("../fonts/Nunito_Sans/nunitosans-bold-webfont.eot");
16
- src: url("../fonts/Nunito_Sans/nunitosans-bold-webfont.woff2") format("woff2"),
17
- url("../fonts/Nunito_Sans/nunitosans-bold-webfont.woff") format("woff"),
18
- url("../fonts/Nunito_Sans/nunitosans-bold-webfont.ttf") format("ttf");
19
- font-weight: bold;
20
- }
21
-
22
- @font-face {
23
- font-family: "Regular Bold";
24
- font-display: swap;
25
- src: url("../fonts/Regular_Bold/Regular-BoldWEB.eot");
26
- src: url("../fonts/Regular_Bold/Regular-BoldWEB.woff2") format("woff2"),
27
- url("../fonts/Regular_Bold/Regular-BoldWEB.woff") format("woff"),
28
- url("../fonts/Regular_Bold/Regular-BoldWEB.svg") format("svg");
29
- }
30
-
31
- // because Regular has weird caret styles
32
- @font-face {
33
- font-family: "Regular Patch";
34
- src: url("../fonts/Nunito_Sans/nunitosans-bold-webfont.eot");
35
- src: url("../fonts/Nunito_Sans/nunitosans-bold-webfont.woff2") format("woff2"),
36
- url("../fonts/Nunito_Sans/nunitosans-bold-webfont.woff") format("woff"),
37
- url("../fonts/Nunito_Sans/nunitosans-bold-webfont.ttf") format("ttf");
38
- unicode-range: U+003C, U+003E;
39
- }
40
-
41
- @font-face {
42
- font-display: swap;
43
- font-family: "Apercu";
44
- font-style: normal;
45
- font-weight: normal;
46
- src: url("../fonts/Apercu/apercu-regular-pro.woff2") format("woff2"),
47
- url("../fonts/Apercu/apercu-regular-pro.woff") format("woff");
48
- }
49
-
50
- @font-face {
51
- font-display: swap;
52
- font-family: "Apercu";
53
- font-style: normal;
54
- font-weight: bold;
55
- src: url("../fonts/Apercu/apercu-bold-pro.woff2") format("woff2"),
56
- url("../fonts/Apercu/apercu-bold-pro.woff") format("woff");
57
- }
58
-
59
- @font-face {
60
- font-display: swap;
61
- font-family: "Apercu";
62
- font-style: italic;
63
- font-weight: normal;
64
- src: url("../fonts/Apercu/apercu-italic-pro.woff2") format("woff2"),
65
- url("../fonts/Apercu/apercu-italic-pro.woff") format("woff");
66
- }
67
-
68
- @font-face {
69
- font-display: swap;
70
- font-family: "Apercu";
71
- font-style: italic;
72
- font-weight: bold;
73
- src: url("../fonts/Apercu/apercu-bold-italic-pro.woff2") format("woff2"),
74
- url("../fonts/Apercu/apercu-bold-italic-pro.woff") format("woff");
75
- }
76
-
77
- @font-face {
78
- font-display: swap;
79
- font-family: "Suisse";
80
- font-weight: normal;
81
- src: url("../fonts/Suisse/SuisseIntlMono-Regular-WebS.woff2") format("woff2"),
82
- url("../fonts/Suisse/SuisseIntlMono-Regular-WebS.woff") format("woff");
83
- }
84
-
85
- @font-face {
86
- font-display: swap;
87
- font-family: "Suisse";
88
- font-weight: bold;
89
- src: url("../fonts/Suisse/SuisseIntlMono-Bold-WebS.woff2") format("woff2"),
90
- url("../fonts/Suisse/SuisseIntlMono-Bold-WebS.woff") format("woff");
91
- }
92
-
93
- @font-face {
94
- font-display: swap;
95
- font-family: "Hanken Grotesk";
96
- font-style: normal;
97
- font-weight: normal;
98
- src: url("../fonts/Hanken_Grotesk/hanken-grotesk-regular.woff2")
99
- format("woff2"),
100
- url("../fonts/Hanken_Grotesk/hanken-grotesk-regular.woff") format("woff");
101
- }
102
-
103
- @font-face {
104
- font-display: swap;
105
- font-family: "Hanken Grotesk";
106
- font-style: normal;
107
- font-weight: bold;
108
- src: url("../fonts/Hanken_Grotesk/hanken-grotesk-bold.woff2") format("woff2"),
109
- url("../fonts/Hanken_Grotesk/hanken-grotesk-bold.woff") format("woff");
110
- }
111
-
112
- @font-face {
113
- font-display: swap;
114
- font-family: "Hanken Grotesk";
115
- font-style: italic;
116
- font-weight: normal;
117
- src: url("../fonts/Hanken_Grotesk/hanken-grotesk-italic.woff2")
118
- format("woff2"),
119
- url("../fonts/Hanken_Grotesk/hanken-grotesk-italic.woff") format("woff");
120
- }
121
-
122
- @font-face {
123
- font-display: swap;
124
- font-family: "Hanken Grotesk";
125
- font-style: italic;
126
- font-weight: bold;
127
- src: url("../fonts/Hanken_Grotesk/hanken-grotesk-bold-italic.woff2")
128
- format("woff2"),
129
- url("../fonts/Hanken_Grotesk/hanken-grotesk-bold-italic.woff")
130
- format("woff");
131
- }
package/core/_reboot.scss DELETED
@@ -1,487 +0,0 @@
1
- // https://raw.githubusercontent.com/twbs/bootstrap/v4-dev/scss/_reboot.scss
2
-
3
- // stylelint-disable at-rule-no-vendor-prefix, declaration-no-important, selector-no-qualifying-type, property-no-vendor-prefix
4
-
5
- // Reboot
6
- //
7
- // Normalization of HTML elements, manually forked from Normalize.css to remove
8
- // styles targeting irrelevant browsers while applying new styles.
9
- //
10
- // Normalize is licensed MIT. https://github.com/necolas/normalize.css
11
-
12
- // Document
13
- //
14
- // 1 Change from `box-sizing: content-box` so that `width` is not affected by `padding` or `border`.
15
- // 2 Change the default font family in all browsers.
16
- // 3 Correct the line height in all browsers.
17
- // 4 Prevent adjustments of font size after orientation changes in IE on Windows Phone and in iOS.
18
- // 5 Setting @viewport causes scrollbars to overlap content in IE11 and Edge, so
19
- // we force a non-overlapping, non-auto-hiding scrollbar to counteract.
20
- // 6 Change the default tap highlight to be completely transparent in iOS.
21
-
22
- *,
23
- *::before,
24
- *::after {
25
- box-sizing: inherit; // 1
26
- }
27
-
28
- html {
29
- box-sizing: border-box;
30
- font-family: sans-serif; // 2
31
- line-height: 1.15; // 3
32
- -webkit-text-size-adjust: 100%; // 4
33
- -ms-text-size-adjust: 100%; // 4
34
- -ms-overflow-style: scrollbar; // 5
35
- -webkit-tap-highlight-color: rgba(0, 0, 0, 0); // 6
36
- }
37
-
38
- // stylelint-disable selector-list-comma-newline-after
39
- // Shim for "new" HTML5 structural elements to display correctly (IE10, older browsers)
40
- article,
41
- aside,
42
- dialog,
43
- figcaption,
44
- figure,
45
- footer,
46
- header,
47
- hgroup,
48
- main,
49
- nav,
50
- section {
51
- display: block;
52
- }
53
- // stylelint-enable selector-list-comma-newline-after
54
-
55
- // Body
56
- //
57
- // 1. Remove the margin in all browsers.
58
- // 2. As a best practice, apply a default `background-color`.
59
- // 3. Set an explicit initial text-align value so that we can later use the
60
- // the `inherit` value on things like `<th>` elements.
61
-
62
- body {
63
- margin: 0; // 1
64
- font-family: $font-family-base;
65
- font-weight: $font-weight-base;
66
- line-height: $line-height-base;
67
- color: $color-body;
68
- text-align: left; // 3
69
- background-color: $bg-body; // 2
70
- }
71
-
72
- // Suppress the focus outline on elements that cannot be accessed via keyboard.
73
- // This prevents an unwanted focus outline from appearing around elements that
74
- // might still respond to pointer events.
75
- //
76
- // Credit: https://github.com/suitcss/base
77
- [tabindex="-1"]:focus {
78
- outline: 0 !important;
79
- }
80
-
81
- // Content grouping
82
- //
83
- // 1. Add the correct box sizing in Firefox.
84
- // 2. Show the overflow in Edge and IE.
85
-
86
- hr {
87
- box-sizing: content-box; // 1
88
- height: 0; // 1
89
- overflow: visible; // 2
90
- }
91
-
92
- //
93
- // Typography
94
- //
95
-
96
- // Remove top margins from headings
97
- //
98
- // By default, `<h1>`-`<h6>` all receive top and bottom margins. We nuke the top
99
- // margin for easier control within type scales as it avoids margin collapsing.
100
- // stylelint-disable selector-list-comma-newline-after
101
- h1,
102
- h2,
103
- h3,
104
- h4,
105
- h5,
106
- h6 {
107
- margin-top: 0;
108
- margin-bottom: $margin-bottom-headings;
109
- }
110
- // stylelint-enable selector-list-comma-newline-after
111
-
112
- // Reset margins on paragraphs
113
- //
114
- // Similarly, the top margin on `<p>`s get reset. However, we also reset the
115
- // bottom margin to use `rem` units instead of `em`.
116
- p {
117
- margin-top: 0;
118
- margin-bottom: $margin-bottom-paragraph;
119
- }
120
-
121
- // Abbreviations
122
- //
123
- // 1. Remove the bottom border in Firefox 39-.
124
- // 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
125
- // 3. Add explicit cursor to indicate changed behavior.
126
- // 4. Duplicate behavior to the data-* attribute for our tooltip plugin
127
-
128
- abbr[title],
129
- abbr[data-original-title] {
130
- // 4
131
- text-decoration: underline; // 2
132
- text-decoration: underline dotted; // 2
133
- cursor: help; // 3
134
- border-bottom: 0; // 1
135
- }
136
-
137
- address {
138
- margin-bottom: 1rem;
139
- font-style: normal;
140
- line-height: inherit;
141
- }
142
-
143
- ol,
144
- ul,
145
- dl {
146
- margin-top: 0;
147
- margin-bottom: 1rem;
148
- }
149
-
150
- ol ol,
151
- ul ul,
152
- ol ul,
153
- ul ol {
154
- margin-bottom: 0;
155
- }
156
-
157
- dt {
158
- font-weight: $font-weight-dt;
159
- }
160
-
161
- dd {
162
- margin-bottom: 0.5rem;
163
- margin-left: 0; // Undo browser default
164
- }
165
-
166
- blockquote {
167
- margin: 0 0 1rem;
168
- }
169
-
170
- dfn {
171
- font-style: italic; // Add the correct font style in Android 4.3-
172
- }
173
-
174
- // stylelint-disable font-weight-notation
175
- b,
176
- strong {
177
- font-weight: $font-weight-bold; // Add the correct font weight in Chrome, Edge, and Safari
178
- }
179
- // stylelint-enable font-weight-notation
180
-
181
- small {
182
- font-size: $font-size-small; // Add the correct font size in all browsers
183
- }
184
-
185
- //
186
- // Prevent `sub` and `sup` elements from affecting the line height in
187
- // all browsers.
188
- //
189
-
190
- sub,
191
- sup {
192
- position: relative;
193
- font-size: 75%;
194
- line-height: 0;
195
- vertical-align: baseline;
196
- }
197
-
198
- sub {
199
- bottom: -0.25em;
200
- }
201
- sup {
202
- top: -0.5em;
203
- }
204
-
205
- //
206
- // Links
207
- //
208
-
209
- a {
210
- color: $color-link;
211
- text-decoration: $decoration-link;
212
- background-color: transparent; // Remove the gray background on active links in IE 10.
213
- -webkit-text-decoration-skip: objects; // Remove gaps in links underline in iOS 8+ and Safari 8+.
214
-
215
- &:hover {
216
- text-decoration: $hover-decoration-link;
217
- }
218
- }
219
-
220
- // And undo these styles for placeholder links/named anchors (without href)
221
- // which have not been made explicitly keyboard-focusable (without tabindex).
222
- // It would be more straightforward to just use a[href] in previous block, but that
223
- // causes specificity issues in many other styles that are too complex to fix.
224
- // See https://github.com/twbs/bootstrap/issues/19402
225
-
226
- a:not([href]):not([tabindex]) {
227
- color: inherit;
228
- text-decoration: none;
229
-
230
- &:hover,
231
- &:focus {
232
- color: inherit;
233
- text-decoration: none;
234
- }
235
-
236
- &:focus {
237
- outline: 0;
238
- }
239
- }
240
-
241
- //
242
- // Code
243
- //
244
-
245
- // stylelint-disable font-family-no-duplicate-names
246
- pre,
247
- code,
248
- kbd,
249
- samp {
250
- font-family: monospace, monospace; // Correct the inheritance and scaling of font size in all browsers.
251
- font-size: 1em; // Correct the odd `em` font sizing in all browsers.
252
- }
253
- // stylelint-enable font-family-no-duplicate-names
254
-
255
- pre {
256
- // Remove browser default top margin
257
- margin-top: 0;
258
- // Reset browser default of `1em` to use `rem`s
259
- margin-bottom: 1rem;
260
- // Don't allow content to break outside
261
- overflow: auto;
262
- // We have @viewport set which causes scrollbars to overlap content in IE11 and Edge, so
263
- // we force a non-overlapping, non-auto-hiding scrollbar to counteract.
264
- -ms-overflow-style: scrollbar;
265
- }
266
-
267
- //
268
- // Figures
269
- //
270
-
271
- figure {
272
- // Apply a consistent margin strategy (matches our type styles).
273
- margin: 0 0 1rem;
274
- }
275
-
276
- //
277
- // Images and content
278
- //
279
-
280
- img {
281
- vertical-align: middle;
282
- border-style: none; // Remove the border on images inside links in IE 10-.
283
- }
284
-
285
- svg:not(:root) {
286
- overflow: hidden; // Hide the overflow in IE
287
- }
288
-
289
- //
290
- // Tables
291
- //
292
-
293
- table {
294
- border-collapse: collapse; // Prevent double borders
295
- }
296
-
297
- caption {
298
- padding-top: $spacer;
299
- padding-bottom: $spacer;
300
- color: $spacer;
301
- text-align: left;
302
- caption-side: bottom;
303
- }
304
-
305
- th {
306
- // Matches default `<td>` alignment by inheriting from the `<body>`, or the
307
- // closest parent with a set `text-align`.
308
- text-align: inherit;
309
- }
310
-
311
- //
312
- // Forms
313
- //
314
-
315
- label {
316
- // Allow labels to use `margin` for spacing.
317
- display: inline-block;
318
- margin-bottom: $margin-bottom-label;
319
- }
320
-
321
- // Remove the default `border-radius` that macOS Chrome adds.
322
- //
323
- // Details at https://github.com/twbs/bootstrap/issues/24093
324
- button {
325
- border-radius: 0;
326
- }
327
-
328
- // Work around a Firefox/IE bug where the transparent `button` background
329
- // results in a loss of the default `button` focus styles.
330
- //
331
- // Credit: https://github.com/suitcss/base/
332
- button:focus-visible {
333
- outline: 1px dotted;
334
- outline: 5px auto -webkit-focus-ring-color;
335
- }
336
-
337
- input,
338
- button,
339
- select,
340
- optgroup,
341
- textarea {
342
- margin: 0; // Remove the margin in Firefox and Safari
343
- font-family: inherit;
344
- font-size: inherit;
345
- line-height: inherit;
346
- }
347
-
348
- button,
349
- input {
350
- overflow: visible; // Show the overflow in Edge
351
- }
352
-
353
- button,
354
- select {
355
- text-transform: none; // Remove the inheritance of text transform in Firefox
356
- }
357
-
358
- // 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
359
- // controls in Android 4.
360
- // 2. Correct the inability to style clickable types in iOS and Safari.
361
- button,
362
- html [type="button"],
363
- // 1 [type="reset"],
364
- [type="submit"] {
365
- -webkit-appearance: button; // 2
366
- }
367
-
368
- // Remove inner border and padding from Firefox, but don't restore the outline like Normalize.
369
- button::-moz-focus-inner,
370
- [type="button"]::-moz-focus-inner,
371
- [type="reset"]::-moz-focus-inner,
372
- [type="submit"]::-moz-focus-inner {
373
- padding: 0;
374
- border-style: none;
375
- }
376
-
377
- input[type="radio"],
378
- input[type="checkbox"] {
379
- box-sizing: border-box; // 1. Add the correct box sizing in IE 10-
380
- padding: 0; // 2. Remove the padding in IE 10-
381
- }
382
-
383
- input[type="date"],
384
- input[type="time"],
385
- input[type="datetime-local"],
386
- input[type="month"] {
387
- // Remove the default appearance of temporal inputs to avoid a Mobile Safari
388
- // bug where setting a custom line-height prevents text from being vertically
389
- // centered within the input.
390
- // See https://bugs.webkit.org/show_bug.cgi?id=139848
391
- // and https://github.com/twbs/bootstrap/issues/11266
392
- -webkit-appearance: listbox;
393
- }
394
-
395
- textarea {
396
- overflow: auto; // Remove the default vertical scrollbar in IE.
397
- // Textareas should really only resize vertically so they don't break their (horizontal) containers.
398
- resize: vertical;
399
- }
400
-
401
- fieldset {
402
- // Browsers set a default `min-width: min-content;` on fieldsets,
403
- // unlike e.g. `<div>`s, which have `min-width: 0;` by default.
404
- // So we reset that to ensure fieldsets behave more like a standard block element.
405
- // See https://github.com/twbs/bootstrap/issues/12359
406
- // and https://html.spec.whatwg.org/multipage/#the-fieldset-and-legend-elements
407
- min-width: 0;
408
- // Reset the default outline behavior of fieldsets so they don't affect page layout.
409
- padding: 0;
410
- margin: 0;
411
- border: 0;
412
- }
413
-
414
- // 1. Correct the text wrapping in Edge and IE.
415
- // 2. Correct the color inheritance from `fieldset` elements in IE.
416
- legend {
417
- display: block;
418
- width: 100%;
419
- max-width: 100%; // 1
420
- padding: 0;
421
- margin-bottom: 0.5rem;
422
- font-size: 1.5rem;
423
- line-height: inherit;
424
- color: inherit; // 2
425
- white-space: normal; // 1
426
- }
427
-
428
- progress {
429
- vertical-align: baseline; // Add the correct vertical alignment in Chrome, Firefox, and Opera.
430
- }
431
-
432
- // Correct the cursor style of increment and decrement buttons in Chrome.
433
- [type="number"]::-webkit-inner-spin-button,
434
- [type="number"]::-webkit-outer-spin-button {
435
- height: auto;
436
- }
437
-
438
- [type="search"] {
439
- // This overrides the extra rounded corners on search inputs in iOS so that our
440
- // `.form-control` class can properly style them. Note that this cannot simply
441
- // be added to `.form-control` as it's not specific enough. For details, see
442
- // https://github.com/twbs/bootstrap/issues/11586.
443
- outline-offset: -2px; // 2. Correct the outline style in Safari.
444
- -webkit-appearance: none;
445
- }
446
-
447
- //
448
- // Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
449
- //
450
-
451
- [type="search"]::-webkit-search-cancel-button,
452
- [type="search"]::-webkit-search-decoration {
453
- -webkit-appearance: none;
454
- }
455
-
456
- //
457
- // 1. Correct the inability to style clickable types in iOS and Safari.
458
- // 2. Change font properties to `inherit` in Safari.
459
- //
460
-
461
- ::-webkit-file-upload-button {
462
- font: inherit; // 2
463
- -webkit-appearance: button; // 1
464
- }
465
-
466
- //
467
- // Correct element displays
468
- //
469
-
470
- output {
471
- display: inline-block;
472
- }
473
-
474
- summary {
475
- display: list-item; // Add the correct display in all browsers
476
- cursor: pointer;
477
- }
478
-
479
- template {
480
- display: none; // Add the correct display in IE
481
- }
482
-
483
- // Always hide an element with the `hidden` HTML attribute (from PureCSS).
484
- // Needed for proper display in IE 10-.
485
- [hidden] {
486
- display: none !important;
487
- }
@@ -1,36 +0,0 @@
1
- // https://raw.githubusercontent.com/twbs/bootstrap/v4-dev/scss/_type.scss
2
-
3
- h1,
4
- h2,
5
- h3,
6
- h4,
7
- h5,
8
- h6 {
9
- margin-bottom: $margin-bottom-headings;
10
- font-weight: $font-weight-headings;
11
- line-height: $line-height-headings;
12
- }
13
-
14
- h1 {
15
- font-size: $font-size-h1;
16
- }
17
- h2 {
18
- font-size: $font-size-h2;
19
- }
20
- h3 {
21
- font-size: $font-size-h3;
22
- }
23
- h4 {
24
- font-size: $font-size-h4;
25
- }
26
- h5 {
27
- font-size: $font-size-h5;
28
- }
29
- h6 {
30
- font-size: $font-size-h6;
31
- }
32
-
33
- small {
34
- font-size: $font-size-small;
35
- font-weight: $font-weight-normal;
36
- }
package/core/index.scss DELETED
@@ -1,4 +0,0 @@
1
- @forward "../utils";
2
- @forward "reboot";
3
- @forward "fonts";
4
- @forward "typography";
package/core.scss DELETED
@@ -1 +0,0 @@
1
- @forward "core/index";
@@ -1,26 +0,0 @@
1
- @use "sass:math";
2
-
3
- @function strip-units($number) {
4
- @return math.div($number, ($number * 0 + 1));
5
- }
6
-
7
- @function px-rem($px, $base-px: 16) {
8
- @return calc(strip-units($px) / strip-units($base-px)) * 1rem;
9
- }
10
-
11
- @function px-em($px, $base-px: 16) {
12
- @return calc(strip-units($px) / strip-units($base-px)) * 1em;
13
- }
14
-
15
- // Math
16
- @function pow($number, $exponent) {
17
- $value: 1;
18
-
19
- @if $exponent > 0 {
20
- @for $i from 1 through $exponent {
21
- $value: $value * $number;
22
- }
23
- }
24
-
25
- @return $value;
26
- }
package/utils/index.scss DELETED
@@ -1,5 +0,0 @@
1
- // import order is unfortunately important here
2
- // variables needs to access functions, and mixins needs to access variables
3
- @forward "functions/index";
4
- @forward "variables/index";
5
- @forward "mixins/index";
@@ -1,9 +0,0 @@
1
- @mixin font-smoothing($value: on) {
2
- @if $value == on {
3
- -webkit-font-smoothing: antialiased;
4
- -moz-osx-font-smoothing: grayscale;
5
- } @else {
6
- -webkit-font-smoothing: subpixel-antialiased;
7
- -moz-osx-font-smoothing: auto;
8
- }
9
- }
@@ -1,4 +0,0 @@
1
- @mixin no-select {
2
- -webkit-touch-callout: none;
3
- user-select: none;
4
- }
@@ -1,85 +0,0 @@
1
- // Try to use these simple mixins if possible for your responsive needs
2
- @use "../variables/grid" as *;
3
-
4
- // Example usage:
5
- //
6
- // .grid {
7
- // display: flex;
8
- // flex-direction: column;
9
- // @include md-viewport {
10
- // flex-direction: row;
11
- // }
12
- // }
13
-
14
- @mixin sm-viewport {
15
- @media only screen and (min-width: $grid-sm-min) {
16
- @content;
17
- }
18
- }
19
-
20
- @mixin md-viewport {
21
- @media only screen and (min-width: $grid-md-min) {
22
- @content;
23
- }
24
- }
25
-
26
- @mixin lg-viewport {
27
- @media only screen and (min-width: $grid-lg-min) {
28
- @content;
29
- }
30
- }
31
-
32
- @mixin xl-viewport {
33
- @media only screen and (min-width: $grid-xl-min) {
34
- @content;
35
- }
36
- }
37
-
38
- // Media query abstractions if you need more complex responsive behavior
39
- // or custom breakpoints
40
-
41
- @mixin screen-size-lte($max) {
42
- @media screen and (max-width: $max) {
43
- @content;
44
- }
45
- }
46
-
47
- @mixin screen-size-between($min, $max) {
48
- @media screen and (min-width: $min) and (max-width: $max) {
49
- @content;
50
- }
51
- }
52
-
53
- @mixin screen-size-gte($min) {
54
- @media screen and (min-width: $min) {
55
- @content;
56
- }
57
- }
58
-
59
- // Named view port mixin
60
-
61
- @mixin getViewport($viewport) {
62
- @if $viewport == "xl" {
63
- @include xl-viewport() {
64
- @content;
65
- }
66
- }
67
- @if $viewport == "lg" {
68
- @include lg-viewport {
69
- @content;
70
- }
71
- }
72
- @if $viewport == "md" {
73
- @include md-viewport {
74
- @content;
75
- }
76
- }
77
- @if $viewport == "sm" {
78
- @include sm-viewport {
79
- @content;
80
- }
81
- }
82
- @if $viewport == "xs" {
83
- @content;
84
- }
85
- }
@@ -1,19 +0,0 @@
1
- // depth based box-shadows
2
-
3
- @mixin shadow($depth: 1) {
4
- @if $depth == 1 {
5
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
6
- }
7
- @if $depth == 2 {
8
- box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
9
- }
10
- @if $depth == 3 {
11
- box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
12
- }
13
- @if $depth == 4 {
14
- box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
15
- }
16
- @if $depth == 5 {
17
- box-shadow: 0 19px 38px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22);
18
- }
19
- }
@@ -1,37 +0,0 @@
1
- // shamelessly stolen from bootstrap
2
- // https://github.com/twbs/bootstrap/blob/2085c142679563189dbc34ec6bf4b00e32b8f615/scss/mixins/_screen-reader.scss
3
-
4
- @mixin screenreader-only {
5
- position: absolute;
6
- width: 1px;
7
- height: 1px;
8
- padding: 0;
9
- overflow: hidden;
10
- clip: rect(0, 0, 0, 0);
11
- white-space: nowrap;
12
- clip-path: inset(50%);
13
- border: 0;
14
- }
15
-
16
- @mixin sr-only {
17
- @warn "This is deprecated, please use screenreader-only";
18
- @include screenreader-only;
19
- }
20
-
21
- @mixin screenreader-only-focusable {
22
- &:active,
23
- &:focus {
24
- position: static;
25
- width: auto;
26
- height: auto;
27
- overflow: visible;
28
- clip: auto;
29
- white-space: normal;
30
- clip-path: none;
31
- }
32
- }
33
-
34
- @mixin sr-only-focusable {
35
- @warn "This is deprecated, please use screenreader-only-focusable";
36
- @include screenreader-only-focusable;
37
- }
@@ -1,6 +0,0 @@
1
- @forward "font-smoothing";
2
- @forward "no-select";
3
- @forward "responsive";
4
- @forward "shadow";
5
- @forward "sr-only";
6
- @forward "legacy";
@@ -1,48 +0,0 @@
1
- // Legacy Helper mixins
2
- @use "../variables/index.scss";
3
- @use "../mixins/responsive" as *;
4
-
5
- // these variables should be located in ../variables
6
- // instead, they're co-located with their legacy functions so they can be removed more easily
7
- // NOTE: when removing, also remove the legacyBreakpoints JS object in gamut-styles/variables.js
8
- $bp-phone: 0;
9
- $bp-tablet: 736px;
10
- $bp-desktop: 960px;
11
-
12
- @mixin device-phone {
13
- @include screen-size-between($bp-phone, $bp-tablet - 1) {
14
- @content;
15
- }
16
- }
17
-
18
- @mixin device-tablet {
19
- @include screen-size-between($bp-tablet, $bp-desktop - 1) {
20
- @content;
21
- }
22
- }
23
-
24
- @mixin device-desktop {
25
- @include screen-size-gte($bp-desktop) {
26
- @content;
27
- }
28
- }
29
-
30
- @mixin devices($devices...) {
31
- @each $device in $devices {
32
- @if $device == phone {
33
- @include device-phone {
34
- @content;
35
- }
36
- }
37
- @if $device == tablet {
38
- @include device-tablet {
39
- @content;
40
- }
41
- }
42
- @if $device == desktop {
43
- @include device-desktop {
44
- @content;
45
- }
46
- }
47
- }
48
- }
@@ -1,7 +0,0 @@
1
- @use "colors" as *;
2
-
3
- $base-unit: 1rem;
4
- $spacer: $base-unit;
5
- $box-shadow: 0 1px 4px 0 $color-shadow;
6
- $box-shadow-hovered: 0 4px 10px 0 $color-shadow;
7
- $height-header: 4rem;
@@ -1,302 +0,0 @@
1
- // NOTE: These are actively being deprecated. Use with caution.
2
-
3
- @use "sass:color";
4
- // =======================================
5
- // STANDARD COLORS
6
- // =======================================
7
-
8
- $color-beige: #fff0e5;
9
- $color-light-blue: #66c4ff;
10
- $color-blue: #1557ff;
11
- $color-green: #088a27;
12
- $color-light-green: #aee938;
13
- $color-navy: #10162f;
14
- $color-orange: #ff8c00;
15
- $color-pink: #f966ff;
16
- $color-red: #e91c11;
17
- $color-yellow: #ffd300;
18
- $color-hyper: #3a10e5;
19
- $color-pale-blue: #f5fcff;
20
- $color-pale-green: #f5ffe3;
21
- $color-pale-pink: #fff5ff;
22
- $color-pale-yellow: #fffae5;
23
-
24
- // =======================================
25
- // INTERACTIVE COLORS
26
- // =======================================
27
-
28
- $color-interactive-dark: $color-hyper;
29
- $color-interactive-light: $color-yellow;
30
-
31
- // =======================================
32
- // OTHER COLORS
33
- // =======================================
34
-
35
- $color-white: #ffffff;
36
- $color-black: #000000;
37
- $color-shadow: rgba($color-black, 0.15);
38
-
39
- // =======================================
40
- // PLATFORM COLORS
41
- // =======================================
42
-
43
- $platform-mint-500: #37c3be;
44
-
45
- $platform-mint-600: color.mix($color-black, $platform-mint-500, 20%);
46
- $platform-mint-700: color.mix($color-black, $platform-mint-500, 40%);
47
-
48
- $platform-purple-500: #69639a;
49
-
50
- $platform-purple-200: color.mix($color-white, $platform-purple-500, 60%);
51
- $platform-purple-300: color.mix($color-white, $platform-purple-500, 40%);
52
- $platform-purple-400: color.mix($color-white, $platform-purple-500, 20%);
53
- $platform-purple-600: color.mix($color-black, $platform-purple-500, 20%);
54
- $platform-purple-700: color.mix($color-black, $platform-purple-500, 40%);
55
- $platform-purple-800: color.mix($color-black, $platform-purple-500, 60%);
56
- $platform-purple-900: color.mix($color-black, $platform-purple-500, 80%);
57
-
58
- // =======================================
59
- // EDITOR COLORS
60
- // =======================================
61
-
62
- $color-editor-blue: #83fff5;
63
- $color-editor-deep-purple: #cc7bc2;
64
- $color-editor-gray: #939598;
65
- $color-editor-green: #b4d353;
66
- $color-editor-orange: #ff8973;
67
- $color-editor-purple: #b3ccff;
68
- $color-editor-red: #ea6c8b;
69
- $color-editor-yellow: #ffe083;
70
-
71
- // =======================================
72
- // LEGACY COLOR SWATCHES
73
- // =======================================
74
-
75
- $color-blue-100: #c8d7fa;
76
- $color-blue-200: #a5befa;
77
- $color-blue-300: #7da2fa;
78
- $color-blue-400: #5788fa;
79
- $color-blue-500: #3069f0;
80
- $color-blue-600: #2d5dcc;
81
- $color-blue-700: #2e4a99;
82
- $color-blue-800: #233466;
83
- $color-blue-900: #141c3a;
84
- $color-blue-1000: #10162f;
85
- $color-blue-1100: #0a0e1d;
86
-
87
- $color-pink-100: #ffd9fc;
88
- $color-pink-200: #ffbffa;
89
- $color-pink-300: #ffa6f8;
90
- $color-pink-400: #f288e9;
91
- $color-pink-500: #d957d9;
92
- $color-pink-600: #b035c9;
93
- $color-pink-700: #9129a6;
94
- $color-pink-800: #702080;
95
- $color-pink-900: #43134d;
96
-
97
- $color-purple-100: #d5ccff;
98
- $color-purple-200: #c0b6f2;
99
- $color-purple-300: #ac9df2;
100
- $color-purple-400: #917ef2;
101
- $color-purple-500: #7c5ce6;
102
- $color-purple-600: #6437cc;
103
- $color-purple-700: #4b2999;
104
- $color-purple-800: #381f73;
105
- $color-purple-900: #231347;
106
-
107
- $color-red-100: #ffd3cc;
108
- $color-red-200: #ffb8ad;
109
- $color-red-300: #ff988c;
110
- $color-red-400: #ff7566;
111
- $color-red-500: #fd4d3f;
112
- $color-red-600: #e53935;
113
- $color-red-700: #bf2e2c;
114
- $color-red-800: #992523;
115
- $color-red-900: #661917;
116
-
117
- $color-green-100: #bbfae5;
118
- $color-green-200: #91f2d2;
119
- $color-green-300: #6aebc0;
120
- $color-green-400: #4fe0b0;
121
- $color-green-500: #47cca0;
122
- $color-green-600: #3eb38c;
123
- $color-green-700: #318c6e;
124
- $color-green-800: #246650;
125
- $color-green-900: #164032;
126
-
127
- $color-orange-100: #ffe9c8;
128
- $color-orange-200: #ffd093;
129
- $color-orange-300: #ffb764;
130
- $color-orange-400: #ff9f3c;
131
- $color-orange-500: #ff881d;
132
- $color-orange-600: #fb7106;
133
- $color-orange-700: #dc5a03;
134
- $color-orange-800: #ba4604;
135
- $color-orange-900: #963606;
136
-
137
- $color-yellow-100: #fff7cc;
138
- $color-yellow-200: #fff2b3;
139
- $color-yellow-300: #ffec8c;
140
- $color-yellow-400: #ffe359;
141
- $color-yellow-500: #ffd500;
142
- $color-yellow-600: #ffb92e;
143
- $color-yellow-700: #e69729;
144
- $color-yellow-800: #b37620;
145
- $color-yellow-900: #805417;
146
-
147
- $color-gray-100: #f6f5fa;
148
- $color-gray-200: #dddce0;
149
- $color-gray-300: #c4c3c7;
150
- $color-gray-400: #a2a2a6;
151
- $color-gray-500: #828285;
152
- $color-gray-600: #646466;
153
- $color-gray-700: #4b4b4d;
154
- $color-gray-800: #323233;
155
- $color-gray-900: #19191a;
156
-
157
- $color-royal-blue: #6400e4;
158
-
159
- // =======================================
160
- // BRAND COLORS
161
- // =======================================
162
-
163
- $brand-red: $color-red-500;
164
- $brand-yellow: $color-yellow-500;
165
- $brand-orange: $color-orange-400;
166
- $brand-purple: $color-royal-blue;
167
- $brand-pink: $color-pink-400;
168
- $brand-mint: $color-green-300;
169
- $brand-magenta: $color-pink-700;
170
- $brand-beige: #efd9ca;
171
- $brand-blue: $color-blue-500;
172
- $brand-dark-blue: $color-blue-900;
173
- $brand-lavender: $color-purple-500;
174
-
175
- $deprecated-color-white: #ffffff;
176
- $deprecated-color-black: #000000;
177
-
178
- $deprecated-gamut-purple-500: #69639a;
179
-
180
- $deprecated-gamut-purple-100: color.mix(
181
- $color-white,
182
- $deprecated-gamut-purple-500,
183
- 80%
184
- );
185
- $deprecated-gamut-purple-200: color.mix(
186
- $color-white,
187
- $deprecated-gamut-purple-500,
188
- 60%
189
- );
190
- $deprecated-gamut-purple-300: color.mix(
191
- $color-white,
192
- $deprecated-gamut-purple-500,
193
- 40%
194
- );
195
- $deprecated-gamut-purple-400: color.mix(
196
- $color-white,
197
- $deprecated-gamut-purple-500,
198
- 20%
199
- );
200
- $deprecated-gamut-purple-600: color.mix(
201
- $color-black,
202
- $deprecated-gamut-purple-500,
203
- 20%
204
- );
205
- $deprecated-gamut-purple-700: color.mix(
206
- $color-black,
207
- $deprecated-gamut-purple-500,
208
- 40%
209
- );
210
- $deprecated-gamut-purple-800: color.mix(
211
- $color-black,
212
- $deprecated-gamut-purple-500,
213
- 60%
214
- );
215
- $deprecated-gamut-purple-900: color.mix(
216
- $color-black,
217
- $deprecated-gamut-purple-500,
218
- 80%
219
- );
220
-
221
- $deprecated-gamut-royal-blue-500: #4b35ef;
222
-
223
- $deprecated-gamut-royal-blue-600: color.mix(
224
- $color-black,
225
- $deprecated-gamut-royal-blue-500,
226
- 20%
227
- );
228
- $deprecated-gamut-royal-blue-700: color.mix(
229
- $color-black,
230
- $deprecated-gamut-royal-blue-500,
231
- 40%
232
- );
233
- $deprecated-gamut-royal-blue-800: color.mix(
234
- $color-black,
235
- $deprecated-gamut-royal-blue-500,
236
- 60%
237
- );
238
-
239
- $deprecated-gamut-mint-500: #37c3be;
240
-
241
- $deprecated-gamut-mint-100: color.mix(
242
- $color-white,
243
- $deprecated-gamut-mint-500,
244
- 80%
245
- );
246
- $deprecated-gamut-mint-200: color.mix(
247
- $color-white,
248
- $deprecated-gamut-mint-500,
249
- 60%
250
- );
251
- $deprecated-gamut-mint-300: color.mix(
252
- $color-white,
253
- $deprecated-gamut-mint-500,
254
- 40%
255
- );
256
- $deprecated-gamut-mint-400: color.mix(
257
- $color-white,
258
- $deprecated-gamut-mint-500,
259
- 20%
260
- );
261
- $deprecated-gamut-mint-600: color.mix(
262
- $color-black,
263
- $deprecated-gamut-mint-500,
264
- 20%
265
- );
266
- $deprecated-gamut-mint-700: color.mix(
267
- $color-black,
268
- $deprecated-gamut-mint-500,
269
- 40%
270
- );
271
- $deprecated-gamut-mint-800: color.mix(
272
- $color-black,
273
- $deprecated-gamut-mint-500,
274
- 60%
275
- );
276
- $deprecated-gamut-mint-900: color.mix(
277
- $color-black,
278
- $deprecated-gamut-mint-500,
279
- 80%
280
- );
281
-
282
- $deprecated-gamut-purple: $deprecated-gamut-purple-500;
283
- $deprecated-gamut-royal-blue: $deprecated-gamut-royal-blue-500;
284
- $deprecated-gamut-mint: $deprecated-gamut-mint-500;
285
-
286
- $deprecated-color-grey-1: #e9eaea;
287
- $deprecated-color-grey-2: #d4d5d6;
288
- $deprecated-color-grey-3: #bebfc1;
289
- $deprecated-color-grey-4: #939598;
290
- $deprecated-color-grey-5: #3e3e40;
291
- $deprecated-color-blue: #52b1db;
292
- $deprecated-color-mint: #34b3a0;
293
- $deprecated-color-red: #f65a5b;
294
-
295
- $deprecated-swatches-cc-blue-500: #225470;
296
- $deprecated-swatches-cc-blue-700: #204056;
297
-
298
- $deprecated-swatches-grey-blue-500: #57646e;
299
- $deprecated-swatches-grey-blue-600: #354551;
300
-
301
- $deprecated-swatches-mint-700: #34b3a0;
302
- $deprecated-swatches-mint-800: #1a7b72;
@@ -1,15 +0,0 @@
1
- // Overrides for the Grid component
2
- @use "../functions/index.scss" as *;
3
-
4
- // NOTE: When updating, make sure you also update the gamut-styles/variables.js file
5
-
6
- $max-content-width: 1440px;
7
-
8
- $grid-cols: 12;
9
- $grid-gutter-width: px-rem(16);
10
- $grid-outer-margin: px-rem(16);
11
- $grid-xs-min: px-rem(480);
12
- $grid-sm-min: px-rem(768);
13
- $grid-md-min: px-rem(1024);
14
- $grid-lg-min: px-rem(1200);
15
- $grid-xl-min: px-rem($max-content-width);
@@ -1 +0,0 @@
1
- $screenSizes: ("xs", "sm", "md", "lg", "xl");
@@ -1,56 +0,0 @@
1
- @use "base";
2
- @use "colors";
3
-
4
- // Font Families:
5
-
6
- $font-family-accent: "Suisse", "Apercu", -apple-system, BlinkMacSystemFont,
7
- "Segoe UI", "Roboto", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans",
8
- "Helvetica Neue", sans-serif;
9
-
10
- $font-family-base: "Apercu", -apple-system, BlinkMacSystemFont, "Segoe UI",
11
- "Roboto", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
12
- sans-serif;
13
-
14
- $font-monospace: Monaco, Menlo, "Ubuntu Mono", "Droid Sans Mono", Consolas,
15
- monospace;
16
-
17
- $font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Ubuntu",
18
- "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
19
-
20
- // Font Weights
21
-
22
- $font-weight-light: 300;
23
- $font-weight-normal: normal;
24
- $font-weight-bold: bold;
25
- $font-weight-base: $font-weight-normal;
26
- $font-weight-headings: $font-weight-bold;
27
- $font-weight-dt: $font-weight-bold;
28
-
29
- // Font colors
30
-
31
- $color-body: colors.$color-navy;
32
- $color-headings: colors.$color-gray-900;
33
- $bg-body: colors.$color-white;
34
- $color-link: colors.$deprecated-gamut-royal-blue-500;
35
- $hover-color-link: colors.$deprecated-gamut-royal-blue-600;
36
- $decoration-link: none;
37
- $hover-decoration-link: underline;
38
-
39
- // Font margins
40
-
41
- $margin-bottom-paragraph: base.$spacer;
42
- $margin-bottom-headings: base.$spacer;
43
- $margin-bottom-label: 0;
44
- $line-height-base: 1.5;
45
- $line-height-headings: 1.1;
46
-
47
- // Font sizes
48
-
49
- $font-size-base: base.$base-unit;
50
- $font-size-h1: px-rem(64);
51
- $font-size-h2: px-rem(44);
52
- $font-size-h3: px-rem(34);
53
- $font-size-h4: px-rem(26);
54
- $font-size-h5: px-rem(22);
55
- $font-size-h6: px-rem(20);
56
- $font-size-small: 85%;
@@ -1,8 +0,0 @@
1
- if (process.env.NODE_ENV === 'development') {
2
- // eslint-disable-next-line no-console
3
- console.warn(
4
- 'Importing from `gamut-styles/utils/variables` is now deprecated, please import directly from the gamut-styles package'
5
- );
6
- }
7
-
8
- export * from '../../dist/variables';
@@ -1,5 +0,0 @@
1
- @forward "colors";
2
- @forward "base";
3
- @forward "grid";
4
- @forward "typography";
5
- @forward "responsive";
package/utils.scss DELETED
@@ -1 +0,0 @@
1
- @forward "utils/index";