@financial-times/dotcom-ui-base-styles 4.2.0 → 6.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.
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
// NOTE: please also update
|
|
1
|
+
// NOTE: please also update dotcom-ui-base-styles/styles.scss $o-fonts-path when updating the URLs defined below. They
|
|
2
2
|
// need to stay in-sync to ensure our CSS output matches the resource hints we set.
|
|
3
3
|
export const fontFaceURLs = [
|
|
4
|
-
'https://www.ft.com/__origami/service/build/
|
|
5
|
-
'https://www.ft.com/__origami/service/build/
|
|
6
|
-
'https://www.ft.com/__origami/service/build/
|
|
7
|
-
'https://www.ft.com/__origami/service/build/
|
|
4
|
+
'https://www.ft.com/__origami/service/build/v3/font?font_format=woff2&font_name=MetricWeb-Regular&system_code=origami&version=1.12',
|
|
5
|
+
'https://www.ft.com/__origami/service/build/v3/font?font_format=woff2&font_name=MetricWeb-Semibold&system_code=origami&version=1.12',
|
|
6
|
+
'https://www.ft.com/__origami/service/build/v3/font?font_format=woff2&font_name=FinancierDisplayWeb-Regular&system_code=origami&version=1.12',
|
|
7
|
+
'https://www.ft.com/__origami/service/build/v3/font?font_format=woff2&font_name=FinancierDisplayWeb-Bold&system_code=origami&version=1.12'
|
|
8
8
|
];
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.fontFaceURLs = void 0;
|
|
4
|
-
// NOTE: please also update
|
|
4
|
+
// NOTE: please also update dotcom-ui-base-styles/styles.scss $o-fonts-path when updating the URLs defined below. They
|
|
5
5
|
// need to stay in-sync to ensure our CSS output matches the resource hints we set.
|
|
6
6
|
exports.fontFaceURLs = [
|
|
7
|
-
'https://www.ft.com/__origami/service/build/
|
|
8
|
-
'https://www.ft.com/__origami/service/build/
|
|
9
|
-
'https://www.ft.com/__origami/service/build/
|
|
10
|
-
'https://www.ft.com/__origami/service/build/
|
|
7
|
+
'https://www.ft.com/__origami/service/build/v3/font?font_format=woff2&font_name=MetricWeb-Regular&system_code=origami&version=1.12',
|
|
8
|
+
'https://www.ft.com/__origami/service/build/v3/font?font_format=woff2&font_name=MetricWeb-Semibold&system_code=origami&version=1.12',
|
|
9
|
+
'https://www.ft.com/__origami/service/build/v3/font?font_format=woff2&font_name=FinancierDisplayWeb-Regular&system_code=origami&version=1.12',
|
|
10
|
+
'https://www.ft.com/__origami/service/build/v3/font?font_format=woff2&font_name=FinancierDisplayWeb-Bold&system_code=origami&version=1.12'
|
|
11
11
|
];
|
package/package.json
CHANGED
package/src/lib/fontFaces.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
// NOTE: please also update
|
|
1
|
+
// NOTE: please also update dotcom-ui-base-styles/styles.scss $o-fonts-path when updating the URLs defined below. They
|
|
2
2
|
// need to stay in-sync to ensure our CSS output matches the resource hints we set.
|
|
3
3
|
export const fontFaceURLs = [
|
|
4
|
-
'https://www.ft.com/__origami/service/build/
|
|
5
|
-
'https://www.ft.com/__origami/service/build/
|
|
6
|
-
'https://www.ft.com/__origami/service/build/
|
|
7
|
-
'https://www.ft.com/__origami/service/build/
|
|
4
|
+
'https://www.ft.com/__origami/service/build/v3/font?font_format=woff2&font_name=MetricWeb-Regular&system_code=origami&version=1.12',
|
|
5
|
+
'https://www.ft.com/__origami/service/build/v3/font?font_format=woff2&font_name=MetricWeb-Semibold&system_code=origami&version=1.12',
|
|
6
|
+
'https://www.ft.com/__origami/service/build/v3/font?font_format=woff2&font_name=FinancierDisplayWeb-Regular&system_code=origami&version=1.12',
|
|
7
|
+
'https://www.ft.com/__origami/service/build/v3/font?font_format=woff2&font_name=FinancierDisplayWeb-Bold&system_code=origami&version=1.12'
|
|
8
8
|
]
|
package/styles.scss
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
$system-code: 'page-kit-base-styles' !default;
|
|
2
2
|
|
|
3
3
|
// NOTE: please also update ./src/lib/fontFaces.ts when updating the URL below. They
|
|
4
|
-
// need to stay in-sync to ensure our CSS output matches the resource hints we set
|
|
5
|
-
$o-fonts-path
|
|
4
|
+
// need to stay in-sync to ensure our CSS output matches the resource hints we set, so we don't load the fonts twice (once from resourceHint and once from o-fonts in n-ui-foundations)
|
|
5
|
+
// the $o-fonts-path value here is used to generate the @font-face url https://github.com/Financial-Times/origami/blob/main/components/o-fonts/src/scss/_mixins.scss#L148 that is imported through 'n-ui-foundations/main' styles.
|
|
6
|
+
// we depend on o-fonts's @font-face url instead of explicitly defining it here so we don't have to update page kit again when changing fonts
|
|
7
|
+
$o-fonts-path: 'https://www.ft.com/__origami/service/build/v3/font?version=1.12';
|
|
6
8
|
|
|
7
9
|
// TODO: Migrate into this package existing usage of n-ui-foundations that
|
|
8
10
|
// falls under definition of this package, with the intention of ideally
|