1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | $font-path: 'https://unpkg.com/carbon-components@latest/src/globals/fonts' !default;
|
9 |
|
10 | @import './vendor/@carbon/elements/scss/import-once/import-once';
|
11 | @import 'css--plex-core';
|
12 | @import 'helper-mixins';
|
13 | @import 'feature-flags';
|
14 | @import './vendor/@carbon/elements/scss/type/font-face/mono';
|
15 | @import './vendor/@carbon/elements/scss/type/font-face/sans';
|
16 |
|
17 |
|
18 |
|
19 | @mixin helvetica-font-face {
|
20 |
|
21 |
|
22 | @include deprecate('Usage of Helvetica font in `carbon-components` has been deprecated.') {
|
23 | @include check-default-font-path {
|
24 | @font-face {
|
25 | font-family: 'IBM Helvetica';
|
26 | font-style: normal;
|
27 | font-weight: 300;
|
28 | src: url('#{$font-path}/helvetica-neue-light.woff2') format('woff2'),
|
29 | url('#{$font-path}/helvetica-neue-light.woff') format('woff');
|
30 | }
|
31 |
|
32 | @font-face {
|
33 | font-family: 'IBM Helvetica';
|
34 | font-style: italic;
|
35 | font-weight: 300;
|
36 | src: url('#{$font-path}/helvetica-neue-light-italic.woff2') format('woff2'),
|
37 | url('#{$font-path}/helvetica-neue-light-italic.woff') format('woff');
|
38 | }
|
39 |
|
40 | @font-face {
|
41 | font-family: 'IBM Helvetica';
|
42 | font-style: normal;
|
43 | font-weight: 400;
|
44 | src: url('#{$font-path}/helvetica-neue-roman.woff2') format('woff2'),
|
45 | url('#{$font-path}/helvetica-neue-roman.woff') format('woff');
|
46 | }
|
47 |
|
48 | @font-face {
|
49 | font-family: 'IBM Helvetica';
|
50 | font-style: italic;
|
51 | font-weight: 400;
|
52 | src: url('#{$font-path}/helvetica-neue-roman-italic.woff2') format('woff2'),
|
53 | url('#{$font-path}/helvetica-neue-roman-italic.woff') format('woff');
|
54 | }
|
55 |
|
56 | @font-face {
|
57 | font-family: 'IBM Helvetica';
|
58 | font-style: normal;
|
59 | font-weight: 700;
|
60 | src: url('#{$font-path}/helvetica-neue-bold.woff2') format('woff2'),
|
61 | url('#{$font-path}/helvetica-neue-bold.woff') format('woff');
|
62 | }
|
63 |
|
64 | @font-face {
|
65 | font-family: 'IBM Helvetica';
|
66 | font-style: italic;
|
67 | font-weight: 700;
|
68 | src: url('#{$font-path}/helvetica-neue-bold-italic.woff2') format('woff2'),
|
69 | url('#{$font-path}/helvetica-neue-bold-italic.woff') format('woff');
|
70 | }
|
71 | }
|
72 | }
|
73 | }
|
74 |
|
75 | @include exports('css--font-face') {
|
76 | @if not global-variable-exists('css--font-face') or $css--font-face == true {
|
77 | @if global-variable-exists('css--plex') and $css--plex == true {
|
78 | @if feature-flag-enabled('components-x') {
|
79 | @include carbon--font-face-mono();
|
80 | @include carbon--font-face-sans();
|
81 | } @else {
|
82 | @include plex-font-face;
|
83 | }
|
84 | } @else {
|
85 | @include helvetica-font-face;
|
86 | }
|
87 | }
|
88 | }
|