From 32f68d9466f50581ddcd8e3f7b53d0404c6d4c12 Mon Sep 17 00:00:00 2001 From: derekshirk Date: Tue, 16 Jun 2020 12:27:30 -0700 Subject: [PATCH 1/2] adds additional src/index scss file that includes WP block styles --- .storybook/preview.js | 2 +- src/index-with-wp-block-library.scss | 2 ++ src/vendor/wordpress/gutenberg.stories.mdx | 1 - 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 src/index-with-wp-block-library.scss diff --git a/.storybook/preview.js b/.storybook/preview.js index 00298c7a8..b01cea025 100644 --- a/.storybook/preview.js +++ b/.storybook/preview.js @@ -8,7 +8,7 @@ import * as breakpoints from '../src/design-tokens/breakpoint.yml'; import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'; import { ratio } from '../src/design-tokens/modular-scale.yml'; import 'focus-visible'; -import '../src/index.scss'; +import '../src/index-with-wp-block-library.scss'; import './preview.scss'; // Accessibility testing via aXe diff --git a/src/index-with-wp-block-library.scss b/src/index-with-wp-block-library.scss new file mode 100644 index 000000000..996d2141c --- /dev/null +++ b/src/index-with-wp-block-library.scss @@ -0,0 +1,2 @@ +@import '../node_modules/@wordpress/block-library/build-style/style'; +@import './index'; diff --git a/src/vendor/wordpress/gutenberg.stories.mdx b/src/vendor/wordpress/gutenberg.stories.mdx index b932359e9..822d7f1e3 100644 --- a/src/vendor/wordpress/gutenberg.stories.mdx +++ b/src/vendor/wordpress/gutenberg.stories.mdx @@ -1,6 +1,5 @@ import { Story, Preview, Meta } from '@storybook/addon-docs/blocks'; import codeBlockDemo from '../../design/typography/demo/code-block.twig'; -import '@wordpress/block-library/build-style/style.css'; From ff1d84e4799ccdbf41b8534f60e39330a2f5f726 Mon Sep 17 00:00:00 2001 From: derekshirk Date: Tue, 16 Jun 2020 15:35:53 -0700 Subject: [PATCH 2/2] changes filename and updates import path(name) --- .storybook/preview.js | 2 +- ...-with-wp-block-library.scss => index-with-dependencies.scss} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename src/{index-with-wp-block-library.scss => index-with-dependencies.scss} (100%) diff --git a/.storybook/preview.js b/.storybook/preview.js index b01cea025..e393de5d2 100644 --- a/.storybook/preview.js +++ b/.storybook/preview.js @@ -8,7 +8,7 @@ import * as breakpoints from '../src/design-tokens/breakpoint.yml'; import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'; import { ratio } from '../src/design-tokens/modular-scale.yml'; import 'focus-visible'; -import '../src/index-with-wp-block-library.scss'; +import '../src/index-with-dependencies.scss'; import './preview.scss'; // Accessibility testing via aXe diff --git a/src/index-with-wp-block-library.scss b/src/index-with-dependencies.scss similarity index 100% rename from src/index-with-wp-block-library.scss rename to src/index-with-dependencies.scss