From cd77b406dc4d4020863872a3ff1b1c8af2d5bec6 Mon Sep 17 00:00:00 2001 From: Damon Cook Date: Mon, 6 May 2024 11:21:55 -0400 Subject: [PATCH] Wrap in callout and update phrasing for WP scripts --- .../block-tutorial/applying-styles-with-stylesheets.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/how-to-guides/block-tutorial/applying-styles-with-stylesheets.md b/docs/how-to-guides/block-tutorial/applying-styles-with-stylesheets.md index 24dd50885632ec..bcc1f11bf120e1 100644 --- a/docs/how-to-guides/block-tutorial/applying-styles-with-stylesheets.md +++ b/docs/how-to-guides/block-tutorial/applying-styles-with-stylesheets.md @@ -138,13 +138,16 @@ And a `style.css` file to load on the frontend: The files will automatically be enqueued when specified in the block.json. -You will still need to import your stylesheet within your corresponding JavaSript file in order for `@wordpress/scripts` to process the stylesheet. +
+ +If you are using `@wordpress/scripts` you will need to import your stylesheet within your corresponding JavaSript file in order for `@wordpress/scripts` to process the stylesheet. Example: - In `edit.js` you would place `import './editor.scss';` - In `index.js` you would place `import './style.scss';` - In `view.js` you would place `import './view.scss';` (interactive block template) +
**Note:** If you have multiple files to include, you can use standard `wp_enqueue_style` functions like any other plugin or theme. You will want to use the following hooks for the block editor: