From c4ca2976cd71bb5e18b3e1d69b94ba847a49020e Mon Sep 17 00:00:00 2001 From: Aleksandra Pleshcheva <46083995+aeksandla@users.noreply.github.com> Date: Mon, 25 Nov 2024 15:18:24 +0300 Subject: [PATCH] fix: remove loading default font (#1078) * fix: remove loading default font * fix: change file with fonts --- .storybook/preview.tsx | 1 + README.md | 6 ++++++ playwright/playwright/index.scss | 1 + src/widget/styles.scss | 1 + styles/fonts.scss | 1 + styles/styles.scss | 1 - 6 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 styles/fonts.scss diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx index 6648d7b5e..48ed73caa 100644 --- a/.storybook/preview.tsx +++ b/.storybook/preview.tsx @@ -15,6 +15,7 @@ import {Theme} from '../src'; import {GlobalThemeController} from './theme/utils/global-theme-controller'; import '../styles/styles.scss'; +import '@gravity-ui/uikit/styles/fonts.css'; const withContextProvider: Decorator = (Story, context) => { const theme = context.globals.theme; diff --git a/README.md b/README.md index 3da589850..24bf00d8b 100644 --- a/README.md +++ b/README.md @@ -166,6 +166,12 @@ To use mixins and constructor style variables when creating custom blocks, add i @import '~@gravity-ui/page-constructor/styles/styles.scss'; ``` +To use default font, add import in your file: + +```css +@import '~@gravity-ui/page-constructor/styles/fonts.scss'; +``` + ### Loadable blocks It's sometimes necessary that a block renders itself based on data to be loaded. In this case, loadable blocks are used. diff --git a/playwright/playwright/index.scss b/playwright/playwright/index.scss index 7e9ada0b9..83b412e1a 100644 --- a/playwright/playwright/index.scss +++ b/playwright/playwright/index.scss @@ -1,2 +1,3 @@ @import '../../styles/styles.scss'; +@import '../../styles/fonts.scss'; @import '../../styles/storybook/index.scss'; diff --git a/src/widget/styles.scss b/src/widget/styles.scss index 7a17f9ab7..7745dd8f9 100644 --- a/src/widget/styles.scss +++ b/src/widget/styles.scss @@ -1 +1,2 @@ @import '../../styles/styles.scss'; +@import '../../styles/fonts.scss'; diff --git a/styles/fonts.scss b/styles/fonts.scss new file mode 100644 index 000000000..637a6e1cd --- /dev/null +++ b/styles/fonts.scss @@ -0,0 +1 @@ +@import '@gravity-ui/uikit/styles/fonts.css'; diff --git a/styles/styles.scss b/styles/styles.scss index 5c2a8d3e0..2b3d63c5b 100644 --- a/styles/styles.scss +++ b/styles/styles.scss @@ -1,4 +1,3 @@ -@import '@gravity-ui/uikit/styles/fonts.css'; @import '~@gravity-ui/uikit/styles/styles.css'; @import './mixins.scss'; @import './variables.scss';