Skip to content

Commit

Permalink
Wrap in callout and update phrasing for WP scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
colorful-tones committed Aug 7, 2024
1 parent b36986f commit cd77b40
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
<div class="callout callout-info">

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)
</div>

**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:

Expand Down

0 comments on commit cd77b40

Please sign in to comment.