Custom Blocks: Force External Stylesheets/disable “inline-css”?

[ad_1]

I can’t believe how difficult it is to find documentation on this (and whether it’s even possible to change). I’m using WP 6.1 and the “create-block” scaffolding. All my custom block CSS is being rendered on the front-end as inline styles, e.g.

<style id=’custom-block-page-hero-style-inline-css’ type=’text/css’>

Ironically, in the dashboard, they are coming through as external stylesheets, e.g.

<link rel=’stylesheet’ id=’custom-block-page-hero-style-css’ href=’http://localhost/wordpress/wp-content/plugins/custom-blocks/build/page-hero/style-index.css?ver=0.1.0′ media=’all’ />

How can I replicate this behavior on the frontend? I know inline CSS is faster and WP is really leaning into that, but I really just want external stylesheets, and can’t seem to locate any documentation on how to force this behavior.

[ad_2]
1 Comment

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer