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';